New Window from Window

I have a dhtmlx layout, from this one, i open a dhtmlxWindow with a grid attached. On this grid i have a button witch open a new dhtmlxWindow, but this new window is attached to the old one and the datagrid. I tried to define the window in the main page as

var dhxWinsNew = new dhtmlXWindows();


and create the new window in this way

var win = parent.dhxWinsNew.createWindow(…);

But is not working, any idea?

thanks in advance

If you don’t use iframes, var win = dhxWinsNew.createWindow(…); must be enough.

Please, provide the sample to reproduce the problem.