problem on using dhtmlxWindows

hi there.



im using dhtmlxWindows for popup contents.

the contens attached by attachURL().



i can not access ‘parent’ object when contents submited.



what is the problem on below?



can anyone help?



ps. i am not a native speaker of English. but i hope you can understand my message :slight_smile:



parent.asp

=================================



=================================





form.asp

=================================





    

        

        

         // <-- this script works

    





=================================





action.asp

=================================





some ASP codes…









=================================


Hi,


Please try to use the following code at the action.asp page to close win1 window:







thanks for advice.



but it still throw error ‘undefined’ is null or not an object.



//parent.dhxWins.window(“w1”).close();
parent.win1.close(); // <-- error : ‘undefined’ is null or not an object.



i’m using IE7.

You are using
function newWin(){

var win1 = dhxWins.createWindow(“w1”, 0, 0, 490, 450);

As result var win1 visible only from context of that function, and not visible for any other code ( good approach in common place, but cause problems for you calls from iframe)
To resolve issue just define it on global level.

var win1;
function newWin(){

win1 = dhxWins.createWindow(“w1”, 0, 0, 490, 450);