shtmlXWindow

This component is Super!



I have a question, how can i close modal window from attached html or php document?



or attached document conatin button <input type=“button” onclick='close.modalwindow(‘w1’)>

If you are using attachURL , you can access parent window and call related method as





where
- dhxWins - name of window controller in parent windows
- w1 - name of window which need to be closed



Hi,



What if I am using attachObject in situation like that, how can I close modal window by clicking a button inside attached DIV?



Thank you.


Hi,


in this case the approach is simpler - just call close() method for window object. For example:





Check my code please:





Test





<script  src="…/…/codebase/dhtmlxwindows.js">
<script  src="…/…/codebase/dhtmlxcommon.js">

























I’ve got ‘w1’ is undefined javascript error. What is wrong?



Thank you.


Hello,


There is a JavaScript issue in your code - w1 is a private variable. The following will work correctly:


var w1;

function showModalWindow() {


var dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("…/…/codebase/imgs/");

w1 = dhxWins.createWindow(“w1”, 10, 10, 320, 240);



}