Thursday, 2 August 2007

Javascript window.location not working in Internet Explorer

If anyone encounters issue of not window.location, window.location.href, document.location and every possible combination not working, try this out instead:

redirect = "";
setTimeout("window.location.href = redirect",0);

Don't know why it works, but it works!!! Found this issue in both IE6 and IE7.

No comments: