Life after Work

Location.href problem in IE

Another case of something that seemed to always work and now all of a sudden doesn’t. I have a function loadSomething, that when clicked, does only:

location.href = ‘someurl.cfm’;

And it worked fine in FF but not in IE (6). So, after a few minutes of Googling I found out that you can solve the problem by adding


behind the redirect. Now it works in IE, too. Go figure!

RSS 2.0 | Trackback | Comment

7 Responses to “Location.href problem in IE”

  1. htk

    Thank you very much, your trick worked. nice work. Thanks once again for solving my problem.

  2. asd

    huh thanks man
    ive been looking for this all day long :S

  3. Tanuja

    Hi its worked finally.
    Thank you so much.

  4. This trick is really amazing. Thank you very much.

  5. dominik

    THANK YOU !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  6. Jerry

    Thank you ! ^__^

  7. In IE8, I have seen an intermittent “window.event is null” error. You have to add a check for “if (window.event != null)” before setting the returnValue to false.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>