View Full Version : Use window object across pages...
01-09-2003, 07:17 PM
When I access a page (page1), this page opens a new page(page2), when this page is closed it opens a new page (page3) with 'onunload'. How do I get page3 to alter the location of page1.
01-09-2003, 10:06 PM
You can't. The only way you could access page1 is via page2, so if you close page2, you're stuck.
01-09-2003, 10:25 PM
Before you close page2, you can pass the opener reference to page3 and so it might be possible to change window1 from page3. I say might because I haven't tested this, and don't know if the variable pertains after page2 has been closed. Try it out.
01-10-2003, 09:04 AM
I've testet it and I knew that I could reach page 1 if I had page 2 open the trick is that Page3 only opens when page2 is closed....
And the bad thing is it's a must... Is it not a posibility to make an object which is reachable to all pages open who knows the object name, whitout any reference sendt between pages?
I hope or then I'll have to make one :)
01-10-2003, 09:55 AM
I've reached a soloution...
when page2 is opened it sets a var closed = 'true' and when my page is closed I alter the location of Page1 but if page2 just clicks a link onUnload will still execute but before var closed will be set to 'false' and page1 will not be altered:
var closed = true
<a href="page.html" onclick="closed=false">link</a>
hope it helps others in the same problem...
thanks for your help both of you!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.