Close Modal dhtmlXWindows


I have used and purchased several of your great scripts and am having a challenging getting a modal’d window to close.

Here is my code for initializing my window:

var xWins = new dhtmlXWindows();


    xWins.createWindow(‘acctReg’, 300, 300, 600, 610);


    xWins.window(‘acctReg’).setText(“Player Registration”);






The URL above that I am opening has a registration form in it that I am using to register the user. That page submits to a different on and the “process” page has js code in there to close the window. I have tried to use: parent.xWins.window(‘acctReg’).close(); but it isn’t working – firebug states: parent.xWins has no properties. I have also tried several other combinations but they haven’t worked either.

Any ideas on how to close my modal xWindow?

FYI, the modal “greyout” background works fine in Firefox and NOT in IE6.0 for me. FYI, I downloaded the code from a previous post on the forum/KB and that got it working in FF – not visible in IE though.



Any ideas on how to close my modal xWindow?

I see two possible issues
a) cross-domain security - please be sure that both main window and content of dhxWindow - both loaded from the same domain.
b) the visibility of xWins  variable - is the provided code snippet executed on global level ( so the xWins property is global ) or inside some kind of “init” function - in second case the variable xWins will be created as local for init function and will not be accessible for outer calls. ( just be sure that xWins variable defined on global level )

>> not visible in IE though.
Correct css file attached to post, must work in both FF and IE (481 Bytes)