[Javascript] Setting a variable in a child window
Andrew Bush
andrew.b at ihug.co.nz
Tue Feb 5 12:21:10 CST 2002
Hi Cutter
Thanks for your reply.
> You could pass MyParent in the url
> (http://my.domain.com/page.html?MyParent=name) then access the var through
> the javascript in the new page.
Thats a good idea except that in this case myParent is to be set to a
reference to the parent window.
I dont think passing the name as a string would work would it?
Thanks again for your time.
Yours cheerfully,
Andrew Bush
>
>>
>> I open a new popup type window from my main window using
>> newWin=window.open(etc etc)
>>
>> the javascript in the new window declars a variable
>> var myParent;
>>
>> what I want to do from the main window, immediately after opening the new
>> window is somthing like:
>> newWin.myParent=self;
>>
>> this direct approach doesn't work, I assume because it takes a little time
>> for newWin to load and read the javascript that declares myParent.
>>
>> does anyone know of an alternative approach that will work?
>>
--
To misquote Mr Terry Pratchett:
The word for a society where everyone is pulling together is 'Tyranny', in a
free country everyone tends to pull in different directions.
More information about the Javascript
mailing list