Technical Post: IE6 "Show Picture" Bug
Ok this is a technical post. I now have a huge headache because of one stupid IE6 bug. Turns out that if your application has a link with the value of javascipt:void(0) and it is used to load an image into the dom using innerHTML then the image will not display on IE6. Instead the href value of the link needs to be '#' instead of 'javascript:void(0)'. Of course this sticks the # into the url, which is why I avoided it in the first place, but it does get the picture to display...
Stupid IE. What an obscure little bug.
Stupid IE. What an obscure little bug.

11 Comments:
Thank you so much for posting about this bug!! I've literally been wrapping my brain around this for a week.
Amen to the above post. Although I haven't been working on this problem for a week, I had lost all hope that IE could give me what I wanted. An obscure bug indeed. This is the fix I was looking for.
< a href="javascript:void(0);" onclick="doSomething();return false;" >
Adding return false might do the trick. You need to tell ie that the anchor tag should not do it's default behevior (go to another page). Just to returning false on form submit when doing form validation.
thanks a lot, i am working since 4 hours on this bug ! and you give me the solution !! THHAANNKKS !!
I cannot thank you enough for posting this. I've been searching for a solution to this bug for over a day; I had no idea it was something so simple!
Additionally, the "return false" method works just as well, and I am using that approach. This way, it really doesn't matter what I put in the href, as the other poster said.
Thank you sooooooooo much!!! I spent hours on this problem.
Thanks a ton Jared. I was losing my sleep over this bug.. Thanksssss again...
Thanks to Mr.Anonymous too for the solution.. :)
Thank you!!! This was very helpful.
I was able to achieve the same result by just adding "return false;" to onclick
e.g. -
href="javascript:;" onClick="doSomething(); return false;"
You da man
The solution really helps me; thanks to everybody.
--Rishi
Post a Comment
<< Home