This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes IE7 and parent.location not working? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "IE7 and parent.location not working?" Watch "IE7 and parent.location not working?" New topic

IE7 and parent.location not working?

Marcin O'Sullivan

Joined: Feb 13, 2007
Posts: 6

In a script used by svg, I have a like like the following to go to a new web page:

This works fine in IE6. However, it has no effect in ie7 (not even a error message, or security message) It just does nothing.

I have noised when i do:

values displayed by alert are not the same!!! parent.parent.location was not overwritten.

(I tried window.location=, window.assign(newUrl), parent.location.href, parent.location= .... none of it works, and I don't get an error message)

Project uses Frames.

Is this expected behavior in ie7? Is this a security thing? Where is there information on this?


Roger F. Gay
Ranch Hand

Joined: Feb 16, 2007
Posts: 408
I don't know where there might be documentation on the problem, but I got document.location= and document.location.href= to work fine in IE7. Now that you mention it though, I have had unexpected problems with parent.... Perhaps I will post that problem separately. You might want to try window.location.replace(URL) or even document.location.replace(URL). (I haven't.)
[ April 23, 2007: Message edited by: Roger F. Gay ]

Correlation does not prove causality.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870


There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: IE7 and parent.location not working?
It's not a secret anymore!