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.

Last two must work

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

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