View Full Version : get data from child window.

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

Thanks in advance. :)

06-08-2004, 08: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;

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;

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

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

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum