targeting (should be simple eh?) - I'm having trouble targeting a framed window (Posted by Uther)
OK, I have two seperate browsers up. The first one is the main webpage browser, and the second is a pop-up window created. The main browser has two frames that are named "contents" and "main." The second browser (named "popup") has a link on it to a completely separate URL. I would like the link to load the URL in the first broswer AND replace both frames. I can target either frames since they are named, but then I'd have to re-target "_top." I've tried a delay command in which I target the contents frame and then onLoad the new URL in the main window using target="_top", but if you then hit the back button in the browser, the onLoad command kicks in again and you end up back where you started. Any ideas how to target another browser, destroy frames in that browser, and still have the back button functional?
Anonymous posted this at 04:28 — 5th November 1999.
They have: 5,633 posts
Joined: Jan 1970
From the popup window use this code.
<a href="javascript: opener.parent.location.href='URL'"></a>
----------
[email protected]
http://go.to/hass
Uther posted this at 22:39 — 9th November 1999.
They have: 6 posts
Joined: Sep 1999
Thank you so much. That one has stumped me for quite some time. It now works, although there is another undesirable that has resluted from it. Whenever the targeted url open in the parent window, the url address on a blank screen replaces it's child. Is there any way to prevent this or even close the "popup" window? Thanks again BTW
Anonymous posted this at 02:14 — 10th November 1999.
They have: 5,633 posts
Joined: Jan 1970
I am not too sure what you mean by "Whenever the targeted url open in the parent window, the url address on a blank screen replaces it's child". If you could show me an example that would be great.
If you want to close to popup window then use this code from your popup window. Note that I have changed the link to access a function.
INSERT <SCRIPT></SCRIPT> TAGS:-
function parentUrlLoad() {
opener.parent.location.href='URL'
self.close();
}
USE THIS AS LINK:-
<a href="javascript:parentUrlLoad()"></a>
----------
[email protected]
http://go.to/hass
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.