Check documentation for the latest version of dhtmlxSuite getFrame DHTMLX Docs

getFrame

returns an iframe object when an URL is attached to a cell

HTMLElement getFrame();
HTMLElementan iframe object

Example

// as loading is async, you need to do it through an event
dhxComponent.attachEvent("onContentLoaded", function(id){
 
    // get frame
    var ifr = dhxComponent.cells(id).getFrame();
 
    // access to iframe's element
    var elem = ifr.contentWindow.document.getElementById("someId");
    elem.innerHTML = "some text";
 
    // access to iframe's function
    // make sure that the function is in the iframe's window scope
    ifr.contentWindow.someFunc();
 
});
 
// and then attach an URL
dhxComponent.cells(id).attachURL("server/page.php?param=value");

Details

You can learn how to manage the attached content from the article Attaching URL.

Back to top