Accessing iframe in popup Windows

Dear all,

   1. I have made a layout 
   2. Pressing a button on the layout I create a popup window (dhxWins. create....) with id="w1" and I attach a URL
   3. Pressing a button on the popup window I return to the layout (parent.window) and i create a new popup window(dhxWins. create....) with id="w2" and I attach another URL
   4. So I have the layout and two popup windows ("w1" and "w2"). The "w1" is modal(false) and the "w2" is modal(true).
   5. Pressing a button on the popup window with id="w2" I return to the layout and try to access the iframe in popup window("w1"). 

   Impossible!

   When I run dhxWins.forEachWindow(function(win){alert("winId= "+win.getId());}) I get only winId="w2"! I cannot see the popup window with id="w1".

   What am I doing wrong?

   P.S. Have in mind that the URLs I attach to each popup window are in the same domain (i make them). Also, i have followed all your suggestions and i have included all references...

 So, the question remains... Why i cannot access the popup window with id="w1"?

Hello,

to access window content inside iframe you can use the following method:

win._frame.contentWindow.document.getElementById(someID);

or to call the function:

win._frame.contentWindow.someFunction();

win is window object

If you try to call functions that are defined in parent window:

parent.someFunction();

How to access a grid located at iframe?

win._frame.contentWindow.gridObject