I have a javascript function which redirects user to a diff page. It goes like this...
redirect : function(url)
{
if(!url)
return false;
alert(url);
if (this.browserClass.isW3C) //IE 6.X comes here
{
window.location.href = url;
}
else if(this.browserClass.isIE4)
{
window.location.href = url;
}
else if (this.browserClass.isNN4)
{
window.location = url;
}
else
{
window.location = url;
}
return false;
},
But the problem is that this does not work in IE (internet explorer 6.X). After a short battle I saw that IE was redirecting when I change the code to this -
if (this.browserClass.isW3C)
setTimeout("location.href = '" +url+"'", 0);
Problem is solved. But what's going on here? Could someone educate me? or is it just one of those mind numbing idiosyncrasies of IE...