28
IE6, IMG, PNG and onClick
Posted by Technocrat | Posted in Uncategorized | Posted on 28-02-2008
I learned that there seems to be a problem with IE6 and using the png transparent javascript hack and onclick. Apparently using the DXImageTransform.Microsoft.AlphaImageLoader fix causes IE6 to not understand the img tag correctly. I found this out because some people couldn”t use an image button on one of my sites which used onclick to launch a javascript function. Turned out to only be IE6 people (why was I not surprised)
After much searching on the net I found that none of the suggested solutions worked. The final result was to use the input tag with an image type. That worked 100% on all browsers. Example:
input type="image" src="url/to/image.png" onclick="function();"
So once again Microsoft proves that their browsers suck!







