faqts : Computers : Programming : Languages : JavaScript : Links

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

27 of 33 people (82%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

I want a link in a popup window to call a function that will pass data back to the parent window?

Jan 9th, 2002 07:48
David Blackledge, Andy Wright,


All popup windows contain the "opener" property that is a reference to 
the window object that opened the current window.
To pass data back to that window, you can do the following:
set a variable:
opener.myvariable = data;
set a text box:
opener.document.forms.myform.mytextbox.value = data;
David.
http://David.Blackledge.com