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();

		dhxWins.vp.style.border = "#909090 1px solid";
		var w1 = dhxWins.createWindow("w1", 10, 10, 500, 250);
				
		w1.setText("Input Devicename");
		dhxWins.window("w1").center();
		dhxWins.window("w1").denyPark();
		dhxWins.window("w1").setModal(true);
		
 		dhxWins.window("w1").attachURL("/myPopupPage.html");

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)

window.opener.callFunc();
parent.window.opener.callFunc();
window.parent.callFunc();
window.top.callFunc();

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.

Hello
Below is code sample of 2 pages as you need:
main:

[code]

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

Thanks

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(){
parent.f1();
parent.dxWins(“w1”).hide();
}

Thank you,

-David

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