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.

Last two must work


The window creates an iframe, so parent will point to the master window.
Be sure that callFunc is defined in the global scope and not inside of some closure. To be safe you can define it like

window.callFunc = function(){ do_some(); }