How to navigate to a URL using JavaScript via IE?

advertisements

How can I navigate to a URL using JavaScript through IE, I have tried most of the functions for JavaScript, and they doesn't work for IE.

window.location.href = ''; //doesn't work for IE
window.location = ''; //doesn't work for IE

window.open(""); //does work for IE but it opens it in a new tab and I don't want this

Please I need help with that. Thank You.

EDIT!!!

window.location.href = ''; //works well for IE, the problem was that I was using jQuery to build my HTML and solved by: jQuery.mobile.navigate("url.html#subPg");


try this self.location=”top.htm”;

tested in IE6,IE7 All the methods below should work in actuality -

1,

window.location.href=”login.jsp?backurl=”+window.location.href;

2,

window.history.back(-1);

3,

window.navigate(”top.jsp”);

4,

self.location=”top.htm”;

5,

top.location=”error.jsp”;