It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

IE7 and parent.location not working?

IE7 and parent.location not working?

Postby camer38 on Mon Apr 23, 2007 12:26 pm

Hi,



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





Code: Select all



parent.location.href = newUrl;





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:



Code: Select all

alert(loc + "?" + entityName);
parent.parent.location = loc + "?" + entityName; alert(parent.parent.location.href);







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?



Thanks,

MR
camer38
 
Posts: 2
Joined: Mon Apr 23, 2007 11:22 am

Postby camer38 on Tue Apr 24, 2007 4:13 pm

I was able to work around the problem by having a script in my page that was called from svg.

You can call a script function that resides on the page from a svg script.

I just put a function like

Code:
gotoUrl(u) { parent.location.href = u; }
on the main page and called this from SVG.

Thank you very much for your suggestion , it puts me on a right tracks.

But it is a workaround, I still do not understand the couse of the problem.
camer38
 
Posts: 2
Joined: Mon Apr 23, 2007 11:22 am


Who is online

Users browsing this forum: No registered users and 3 guests