Window self close

Dear Support Team!

I wolud like close window trough tabbar.

init.js=>

dba.doc_upload = function(){
var dhxWins = new dhtmlXWindows();
win = dhxWins.createWindow(“w1”, 20, 30, 800, 600);
win.setText(“Dokumentum Feltöltése”);
win.setModal(true);
win.center();
win.attachURL(“/infobase_web/index.php/docupload”);
}

docupload =>

toolbar.attachEvent(“onClick”,tab_toolbar_click);

function tab_toolbar_click(id){
switch(id){
case “close”:
win.window(“w1”).close(); =>generate error
break;
case “upload”:
toggle(‘slideItUp2’);
case “delete”:
delete_pic();
default:
alert(‘not imp’);
break;
}
}

Thanks for your help

Hello,

parent.win.close(); will close the window.

i modify th program. PS: The init.js is not part the docupload form.

but already generate error: parent.win.close is not a function

THX

Please see the dhtmlxWindows/samples/01_init/12_inner_close.html sample in the windows package. Hope It’ll help to resolve the problem.