dhtmlxWindow

I have two windows opened, win1 is normal and win2 is modal.

How can I execute an javascript function ( i.e. myUpdate() ) in win1 after a close win2.

Is it possible ?



I�m trying this but it does�t works.



    page_1.html >>
    …
   

    page index.html >>
    …
    var dhxWins= new dhtmlXWindows(…);
    …
    dhxWins.window(“w1”).attachURL(“page_1.html”); // for running function
    dhxWins.window(“w2”)… // for closing
   
    dhxWins.attachEvent(“onClose”, functon(win){
         // check window id
         if (win.getId() == “w2”) {
             // calling function

             dhxWins.window(“w1”)._frame.contentWindow.myFunc();      
             // closing window
             return true;
          }
    });