iFrame element by id not working

I am trying to load an external element, why is this not working?


var ifr = dhxLayout.cells(“b”)._frame.contentWindow.document.getElementById(“content”);


If I do an alert(ifr) it returns null.

Using var ifr = dhxLayout.cells(“b”)._frame.contentWindow.document.getElementById(“content”).innerHTML is of no use also.

Thanks !


it is possible to access only content of the pages from the same domain (cross-domain security policy).

So, if the content is loaded from other domain, dhxLayout.cells(“b”)._frame.contentWindow.document.getElementById(“content”) isn’t possible