How can I get values from iframe attached to Layout object?

I’ve got a composite layout object, one master 2U layout with a 2E layout in each cell, each with another 2E layout in each cell so that I have 8 cells. In one cell, I’m using the attachURL() method to display some input elements from another JSP. How can I reference the input values from that other JSP in my primary JSP? I thought I would be able to reference “top” in my second JSP as I did in a tree view but that didn’t work. thanks, Jim Dixon

To access the parent window from the page inside an iframe you may use parent object. For example:

parent.dhxLayout

to get input element which is inside an iframe:

dhxLayout.cells(“a”).getFrame().contentWindow.document.getElementById(“inputIdHere”)

getFrame() methed return iframe object

hello,
Sorry but this does not work for me…

[code]var displayer= rightPanel.cells(‘a’);
displayer.setText(‘The Displayer’);
displayer.attachURL(‘data/displayer.php’);
ifr = rightPanel.cells(‘a’).getFrame(); // Should have put displayer.getFrame()…

alert(ifr.contentWindow.document.getElementById(“lol”).innerHTML);[/code]

in displayer.php file :

<div id="lol">The Content I want to Display</div>

Here, Alert says : “Null”

I also tried with :

alert(ifr.contentDocument.getElementById("lol").innerHTML);

Same Result

However alert(ifr) returns “[object HTMLIFrameElement]”

Could you please check this ?

My version is 3.0 pro. (Release dhtmlxSuite_v30_pro_111031)

Thanks !

Regards

maybe it returns null because displayer.php is loaded after ?