469,360 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

IE window.location not redirecting

Hi!

I'm working on a page that uses javascript very much. My problem is now
that i cannot redirect to another page in IE with window.location =<URL>;
This command gets executed (proofed with alert messages) but nothing
happens. FF acts like expected but i cant get it work in IE. What can be
the problem here?

here the code i use:

this.NodeSelected = function( node ) {
if ( node.Value != null && node.Value != "" ) {
window.location = node.Value;
}
}

thanks & greetings,
chris
Jul 23 '05 #1
3 22617
Ivo
"Christian Hubinger" wrote

FF acts like expected but i cant get it work in IE. What can be
the problem here?

this.NodeSelected = function( node ) {
if ( node.Value != null && node.Value != "" ) {
window.location = node.Value;
}
}


Hm, if you sure about the value of node.Value, have you tried
window.location.href = node.Value;

hth
ivo
Jul 23 '05 #2
Ivo wrote:
"Christian Hubinger" wrote
FF acts like expected but i cant get it work in IE. What can be
the problem here?

this.NodeSelected = function( node ) {
if ( node.Value != null && node.Value != "" ) {
window.location = node.Value;
}
}
Hm, if you sure about the value of node.Value,


yes i let it show up in an alert biox and it's right, it works perfectly
in FF - IE just ignors it

have you tried window.location.href = node.Value;


well here the things i've tried

window.location = node.Value;
window.location.href = node.Value;
location = node.Value;
location.href = node.Value;
document.location = node.Value;
document.location.href = node.Value;
parent.location = node.Value;
parent.location.href = node.Value;
top.location = node.Value;
top.location.href = node.Value;
....

I've tried everything that came into my mind - and none of them, showed
any effect in IE. It just makes the location in the browser windo show
selected, but no URL change. Also when i do an alert(
window.location.href ); after asiging the new value i still get the old
url displaed - strange isn't it.

I ran out of ideas, the strange thing is that all documentation, forum
posts etc. tell me that this works, so i've no idea whats wrong.

thanks & greetings,
chris
Jul 23 '05 #3
Christian Hubinger wrote:
Ivo wrote:
"Christian Hubinger" wrote

[snip]

Well got it work by doing it that way:

SideBar_RedirectUrl = node.Value;
setTimeout( "window.location.href = SideBar_RedirectUrl", 0 );

don'tknow why this works and the other versions don't - but it works.

greetings,
chris
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Renuka | last post: by
19 posts views Thread by Darren | last post: by
3 posts views Thread by Dan M | last post: by
1 post views Thread by Kalyani | last post: by
4 posts views Thread by Mike | last post: by
1 post views Thread by runsrealfast | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.