PDA

View Full Version : controling windows


jollywoz
09-16-2002, 04:02 PM
Hi all,
i'm looking to grab the url from a frames page running in a newly opened window.
i've got the new window opened from a button, then i can navigate the new window to the page in question.

then i want to go back to the Old(first) window and click a button and grab the url from the newly opened page...

this make sense to anyone?.

window.open('url_to_open','searchthis')

to open the new window.
this page now opened should open a frames page with named frames....

how do i now reference these frames via the original parent.

thx

A1ien51
09-16-2002, 06:31 PM
you need to open the window like this

WindowName = window.open(blah;);

then the parent window aka the opener can talk with the child with: WindowName.document.whatever

you can yalk to the parent window with

opener.document.blah


so if you want to store the window location of the "TopicsFrame" of the parent into the variable TheLoc, you would have to something like this

var TheLoc = opener.parent.TopicsFrame.window.location.href;

fun isn't it;

it gets even better with form elements

opener.parent.FrameName.FormName.ElementName.value;

so I hope I answerewd all of your questions.
If not just tell me what I missed!

A1ien51

jollywoz
09-17-2002, 10:15 AM
excellent, worked like a dream

thx:thumbsup: