Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by carlos garcia on Sep 23, 2009 12:41
open dhtmlx forum
this window don't close why ?

Hi
I am using dhtmlxwindows


dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(true);        
dhxWins.setImagePath("../dhtmlxSuite/dhtmlxwindows/codebase/imgs/");

in the document I am usin a function to create a window

function createWindow(userid)
     {        

        var win = dhxWins.createWindow("ven1",200,200,300,300);
dhxWins.window("ven1").setText("user is debt");
        dhxWins.window("ven1").setModal(true);
        dhxWins.window("ven1").denyResize();
        dhxWins.window("ven1").center();
        dhxWins.window("ven1").allowMove();
        dhxWins.window("ven1").attachURL("form1.php?ced="+userid);
    
}

form1.php is a program with a form, but i need that when the user send data the response page (form2.php) close this window.

How is the most correct way to doit ?
Answer posted by Alex (support) on Sep 24, 2009 01:37

Hello, 

The close() method allows to close window:

dhxWins.window("ven1").close();

If you need to call this method from page inside iframe,  you can use parent.dhxWins.window("ven1").close() instead