Friday, July 17, 2009

onchange and IE

onChange event handler, not supported by Internet Explorer, which is really bad.
As I was using checkbox, which has to hide or show other div on true/ false when checkbox changes its behaviour.

After a study I found that IE waits to loose the focus from the checkbox. As soon as I click on other object or on the page to make it work.

You can see working example at krijnhoetmer.nl
In MSDN Forum they have used setTimeout Window Function. But this didn't work for me.

The only solution worked for me was replacing onChange with onClick event handler.

Thursday, July 16, 2009

PNG in IE6

PNG image format is so useful while making images transparent, but the question arrives that whether it supports all the browsers or not. Well latest browsers do support this format but the problem occurs when we deal with IE6.
Even though we now have IE8, still usage of IE6 is 14.9%.

You can find the latest Browser Statistics Month by Month at w3schools

For that we always use the following available IE6 Hack
In CSS
#trans-content{
background:url(section.png) repeat;
width:100%;
height:260px;
margin:0;
padding:0; }
and
* html #trans-content{background-image:none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='section.png', sizingMethod='scale');}