...

View Full Version : get data from child window.



balljilai
06-08-2004, 09:20 AM
Any function call to receive return value/data from a child window to its parent window.

Thanks in advance. :)

glenngv
06-08-2004, 09:59 AM
Use the opener object to get the handle of the window object of the main window from the popup window.


if (opener && !opener.closed){
var s = opener.document.forms[0].theField.value;
alert(s);
}

If the other way around.


w = window.open('popup.htm');

then somewhere in the code...


if (w && !w.closed){
var s = w.document.forms[0].thePopupField.value;
alert(s);
}

If this is not what you want, then please describe your problem in more detail.

balljilai
06-08-2004, 10:35 AM
That's exactly what I needed.
Thank you so much. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum