Go Geo with HTML5

No Comments

Today I gave a talk on “Go Geo with HTML5” at the fantastic event, “Meta Refresh” conducted by
@hasgeek.
The talk was on the Geolocation API available as part of HTML5 offerings.

The presentation for this talk is available here.

YUI Tidbits

No Comments

A bunch of extremely simple but really useful YUI3 helpers for your daily YUI usage.

YUI Advanced

No Comments

I gave a training on a few advanced topics of YUI to the Yahoo! Maktoob team in Jordan.

YQL & Yahoo! Apis

No Comments

I gave a talk on December 3, 2011 on YQL & Yahoo! Apis in the RHoK Bangalore hackathon event.

Hack with YUI

No Comments

This was the talk I gave on YUI in the IIT Delhi HackU event conducted by Yahoo!

“Shim” technique in IE

1 Comment

In one of the projects I was working, we had an interaction where a DIV element pops up and demands some user action.

The DIV used to get obscured whenever it shows up over a select box in IE6 though i had applied a higer z-index compared

to the select box on the page. One of my team-mates pointed me to a technique called “Shimming”.

I learnt that this problem apparently surfaces on browsers greater than IE 5.5 and happens when floated divs overlap with windowed control.

Now, the question is what is “windowed control”?

According to this KB Article, the various elements on a webpage can be classified as:-

1. Windowed Elements

  • <OBJECT> tag elements
  • ActiveX controls
  • Plug-ins
  • Dynamic HTML (DHTML) Scriptlets
  • SELECT elements
  • IFRAMEs in Internet Explorer 5.01 and earlier

2. Windowless Elements

  • Windowless ActiveX controls
  • IFRAMEs in Internet Explorer 5.5 and later
  • Most DHTML elements, such as hyperlinks or tables

The article further says that -

All windowed elements paint themselves on top of all windowless elements, despite the wishes of their container. However, windowed elements do follow the z-index attribute with respect to each other, just as windowless elements follow the z-index attribute with respect to each other.

All windowless elements are rendered on the same MSHTML plane, and windowed elements draw on a separate MSHTML plane. You can use z-index to manipulate elements on the same plane but not to mix and match with elements in different planes. You can rearrange the z-indexing of the elements on each plane, but the windowed plane always draws on the top of the windowless plane.

The Shim Technique

To overcome this problem, this shim technique is pretty useful. In this technique, we use an absolutely positioned iframe of exactly the same size as the windowed element and below the windowless element

which you want to have a higher z-index.

Typically, while creating an i-frame shim, we do it dynamically. The script snippet would look something like this:

var iframeShim = document.createElement( 'iframe' );
iframeShim.setAttribute( 'src', 'javascript:"";' );
iframeShim.setAttribute( 'frameBorder', '0' );

There are few provisos in the above code -

Make sure you follow proper case for properties like frame border, etc.

If your site is a secure site using the HTTPS protocol, then a mixture of http and https sites might give an error on IE.

Btw, the above snippet also makes sure that there are no additional http requests from the page.

 

 

A Daisy Cutter!

No Comments

If you are wondering what a “Daisy Cutter” means, it is acutally a term used in Cricket for  instances “when a ball rolls along the pitch or bounces more than 2 times after being delivered”. I thought this would be an apt title for this post as it is bound to be patchy to start off.

So it took time for me to start blogging on my own server (VDS) to act as a sink to my constant arbit thoughts on my mind. Currently, I am using a wordpress plugin as the blogging interface. I will try to experiment with a few more.

For some strange reason, I reminisce Fred Brooks‘ quote

“Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer.”

Calvin ThinkingIt seems mightily factual now that am part of a dotcom company and the Internet world is perpetually refashioning and reshaping itself and becoming more and more flippant. But I don’t complain too much too. I love challenges and adapting to constant change which makes life much more exciting.

Well, I don’t want to digress into an insipid monologue about life, internet, etc right away. Will do that later.

For now, Ciao!! Enjoy your time!!

 

 

P.S: Yes, I just love Calvin and Hobbes.