By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

IE window.location not redirecting

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.