Dijkgraaf

msg:4379736 | 8:21 pm on Oct 26, 2011 (gmt 0) |
Why in particular do you want to do it with JavaScript? Isn't it easier just to set the href target to _top? This way it would also work for those that block JavaScript. I personally don't like sites that don't work properly without JavaScript enabled and usually will leave the site as soon as it doesn't work properly. With JavaScript you would want to set top.document.location.href to your desired URL.
|
smithaa02

msg:4379771 | 9:27 pm on Oct 26, 2011 (gmt 0) |
The link is in the subframe toptenpercent.php ... so I have to to _top, it will go to the main frameset page Superframe.php, which I don't want. I want basically a sub frame to go to a sibling frame...possible, even without javascript?
|
Dijkgraaf

msg:4379791 | 10:00 pm on Oct 26, 2011 (gmt 0) |
Then you want parent.document.location.href
|
smithaa02

msg:4380184 | 2:15 pm on Oct 27, 2011 (gmt 0) |
That will climb to the parent, which is I believe how I want to start...but then I have to climb back down to find the sibling...that's the trick. How does one frame reference a sibling frame with javasript, assuming they both share the same frameset parent page.
|
rocknbil

msg:4380256 | 4:53 pm on Oct 27, 2011 (gmt 0) |
Have you tried (deprecated but should work) target="_blank"? Or if you want it to replace the whole page without a new window/tab, target="_top" should work. It shouldn't "go to" superframe, it should replace it - unless you've named it "_top". :-)
|
Dijkgraaf

msg:4380403 | 9:01 pm on Oct 27, 2011 (gmt 0) |
This might help you [yourhtmlsource.com...]
|
JAB Creations

msg:4380424 | 9:50 pm on Oct 27, 2011 (gmt 0) |
You'll need to use try/catch, if someone else put your site in a frame you won't have permission to access top.window. - John try {var a = top.window.location.href;} catch (err) { top.window.location = ''; } |
|
|
|