ASP.NET Cafe
Tips and Tricks

Javascript:void(0); may cause problems in old IE6

Saturday, 26 April 2008 15:46 by Dmitriy

Just found VERY hard bug. The problem appears only in IE6, but some projects still support this browser. If you are using <a href="javascript:void(0);" >Button</a>

And attached OnClick event. You can encounter some really weird things (in event hadler, it works but some strange way). For me - I had to change src of some img tag. But after this no reload happened. Then I've used href="#" the problem was solved. Somebody knows more about these problems? 

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:  
Actions: E-mail | del.icio.us | Kick it! | DZone it! | Permalink | Comments (2) | Comment RSSRSS comment feed

Related posts

Comments

April 29. 2008 22:43

Brandon

This is a known IE6 bug (that thankfully was fixed in IE7)

The proper fix is posted here:
webbugtrack.blogspot.com/.../...t-requests-in.html

The site also lists tons of other IE bugs that you either have, or will run into. Wink

Enjoy

Brandon

June 3. 2008 22:12

ff

这个情况我也遇到..郁闷啊.Frown

ff

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

August 20. 2008 11:19