This is a discussion on "IE7 and parent.location not working?" within the JavaScript Forum section. This forum, and the thread "IE7 and parent.location not working? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
IE7 and parent.location not working?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
IE7 and parent.location not working?
Hi,
In a script used by svg, I have a like like the following to go to a new web page:
I have noised when i do:
(I tried window.location=, window.assign(newUrl), parent.location.href, parent.location= .... none of it works, and I don't get an error message) Is this expected behavior in ie7? Is this a security thing? Where is there information on this? Thanks, MR Last edited by camer38; Apr 20th, 2007 at 14:33. Reason: Please use [code]...[/code] tags when displaying code! |
|
|
|
||||
|
Re: IE7 and parent.location not working?
why are you using parent? are you using frames?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Re: IE7 and parent.location not working?
Hi
I use frames and I regret that it could not be changed. It is a part of a bigger application. I would be grateful for any suggestion or workaround. Cheers, MR |
|
||||
|
Re: IE7 and parent.location not working?
Very strange...
I found this... http://lists.macosforge.org/pipermai...ry/003915.html ...which doesn't apply to IE but suggests there may be security restrictions when executing cross-frame js. have you tried having a 'receiving' function in the target frame? I mean, instead of... parent.parent.location='test1.html' ...try... parent.parent.GO('test1.html'); Then in the parent.parent document, have a function like this: function GO(loc){ window.location = loc; } that way, if there's a restriction on changing the location of a separate frame, you work around it by sending a parameter to that frame and the code within the target frame will change its own location. does that make sense?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Re: IE7 and parent.location not working?
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
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. |
|
||||
|
Re: IE7 and parent.location not working?
It's more than just a work around, it's best practice. Having some code in the frame you want to control implies the frame is allowing you to control it - if you see what I mean...
follow this iead and you should not run into trouble again...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
![]() |
| Tags |
| ie7, parentlocation, svg |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| co-location | tankara | Hosting & Domains | 5 | Jan 18th, 2008 07:54 |
| Search by location | andrwcris | Website Planning | 1 | Sep 11th, 2007 17:33 |
| Need to Trace this Location Map | davva | Graphics and 3D | 4 | Aug 31st, 2006 19:08 |
| parent daughter | maxelcat | Web Page Design | 3 | Aug 14th, 2006 23:34 |