parent html’s JS code
function showFilterWin(){
createPopupWindow(“hierarchywin”, “Change Filter”, 700, 500, “jsp/hierarchypopup_cues.jsp”, false, false, false, true);
}
function test(value1, value2){
alert (value1);
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------
window.js included in parent html
function createPopupWindow(windowId, title, width, height, url, isModal, destroyOnClose, resize, move) {
dhxWinsInit();
if (dhxWins.window(windowId) && dhxWins.window(windowId).isHidden()) {
dhxWins.window(windowId).show();
return;
}
var pWin = dhxWins.createWindow(windowId, 100, 100, width, height);
dhxWins.window(windowId).centerOnScreen();
/pWin.attachEvent(“onContentLoaded”, function(win) {
dhxWins.window(windowId).progressOff();
});
pWin.progressOn();/
pWin.setText(title);
pWin.attachURL(url);
//pWin.setModal(isModal);
if (!destroyOnClose) {
pWin.attachEvent(“onClose”, function() {
dhxWins.window(windowId).hide();
return false;
});
}
if (resize) {
pWin.allowResize();
pWin.button(“minmax1”).enable();
pWin.button(“minmax1”).show();
} else {
pWin.denyResize();
pWin.button(“minmax1”).disable();
pWin.button(“minmax1”).hide();
}
if (move) {
pWin.allowMove();
} else {
pWin.denyMove();
}
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------
code in popup html.(hierarchywin html)
want to call the js function in the parent window. some thing like parent.test(‘using’, ‘dhtmlxwindow v 2.3’);
Have you tried to use this approach? parent.selectNode() is correct way to call functions from the parent window: jsp/hierarchypopup_cues.jsp is loaded into iframe by attachURL method.