DHTMLX Docs & Samples Explorer

attachURL(url, ajax)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxlayout.js / dhtmlxaccordion.js

attaches the specified url to the cell

  • url - url (string)
  • ajax - (boolean) if the parameter is true, the URL is loaded with Ajax

Attaching to the layout's cell:

dhxLayout.cells("a").attachURL("http://some.address.com/some.page.html");

Attaching to the accordion's cell:

dhxAcc.cells(id).attachURL("http://some.address.com/some.page.html");

Attaching to a window:

dhxWins.window(id).attachURL("http://some.address.com/some.page.html");

Attaching to a tab:

dhxTabbar.cells(tabId).attachURL("http://some.address.com/some.page.html");

To get iframe object you need to call getFrame() method:

/*item is layout, tabbar, accordion or windows item*/
item.attachURL("http://some.address.com/some.page.html"); 
var ifr = item.getFrame();