Pass value from child to parent window & call function

In my webpage; on selection of a menu item I am opening a window using the following code -
dhxWins = new dhtmlXWindows(); = "#909090 1px solid";
		var w1 = dhxWins.createWindow("w1", 10, 10, 500, 250);
		w1.setText("Input Devicename");

In the Popup page (myPopupPage.html) I have an input box & a checkbox. Once user enters data I validate it & then want to pass these values to variables in the parent window & call a function in the parent window. I have tried different ways of doing this -
window.opener.document.getElementById(parentVar).value = childVar;
window.parentVar= childVar; (this works in firefox but not in IE)


But none of these work. callFunc is defined in the calling page (parent window). Do you have any samples of something like this? Please help. Thanks.

Below is code sample of 2 pages as you need:


DHTMLX test html, body { width: 100%; height: 100%; margin: 0px; overflow: hidden; }
[/code] iframe ("form_input.html"): [code] DHTMLX test


Hello Darya,

I am trying to do the same thing SpckDh99 needed to do - send back information and call a function from the ‘popped up’ Window to the underlying ‘parent’ window.

I have read your ‘solution’ and do not see how or when the popped up window (w1) calls back into the parent window (to function f1). All I see is that you have a button on the parent window that can ‘get’ the data from the still open w1 window. Is that the entire solution?

Shouldn’t there be a js function inside the w1 page that says something like your documentation shows:
function callParent(){

Thank you,


Yep, the above snippet missing the call from window to the main app. It is quite simple as you can use "parent or “top” to access the upper level frame.

To get child-frame from the main app, you can use win.getFrame().contentWindow API