Hi,can anybody help me how to close the window?
currently im not using onclick to close the window as guided in the tutorial, i call the function directly, but it comes out the error message, ‘parent.dhxWin is null’… please help!thank you~
Hi,can anybody help me how to close the window?
currently im not using onclick to close the window as guided in the tutorial, i call the function directly, but it comes out the error message, ‘parent.dhxWin is null’… please help!thank you~
Hi,
to close the window you may use close() method:
win.close();
thanks…
but the error shows win is undefined…
now my case is like this…
i have a form, it will go to the action page after the submit button, how can i close my dhtmlxwindow automatically after the action page has finished?
pls help.thanks!
but the error shows win is undefined…
win means window object. You need to use the necessary window object instead - call close method for a necessary window.
Here is the sample closing window from an iframe:
dhtmlxWindows/samples/01_init/12_inner_close.html
my problem is not solved yet
dhxWins = new dhtmlXWindows();
dhxWins.setImagePath(“dhtmlx/dhtmlxWindows/codebase/imgs/”);
win = dhxWins.createWindow(“w1”, 0, 0, 300, 300);
win.attachURL(“BookList.asp?Type=Cooking”);
as u can see, it will direct to BookList.asp page wheres a form is there. .
<form name="frmBookType" method="post" action="BookList.asp?Type=Update> <p>There are two button, submit and close. I managed to close by referring the tutorial you hv given but for the sumit button, it wil go to action page. I wanted the window to be close automatically after action page has done it part. any idea with it?</p> <p>thanks for your kind help!</p>You may set onsubmit event handler for form or onclick for submit button. And close window from this handler
can i return some values to the dhtmlxwindows? then base on the value to close the windows. can this be done?
or something we can replace codings like this.
window.returnValue=1;window.close();
The issue is not clear enough. But it seems that it doesn’t relate dhtmlxwindows component.
i mean can we return something in order to determine closing the pop up window.
Hello,
there is onClose event that is called before a window is closed:
win.attachEvent("onClose",function(){
/*your code here*/
return true;
})
oh…but how can i call the event?
or in other word how can i return a “true” value from my children frame to parent frame in order to close the window?
thanks a lot!
but how can i call the event?
win is the object of dhtmlxWindow that is created by createWindow method.
in other word how can i return a “true” value from my children frame to parent frame in order to close the window?
You need to call close() method for the dhxWindow you want to close.