Getting element from tabbar

I have an element in the page, which is loaded into tabbar, which is part of layout, which is included in modal window. Please help me to access this element from parent page, from which the window is created.

I can easily access the window element, but window.getFrame() is undefined, so I have no idea how to get the layout and then the tabbar attached to it.


if you doesn’t use an iframe (attachURL method), document.getElementById(“elementId”) is enough to get the object of html element.

thank you for your answer.
But I do use attachUrl method to load pages into layout and document.getElementById doesn’t work.

Could you provide more details about the problem? The sample would be helpful.

There is a page with layout. From one of the cells the window is opened, but I use parent.dhxWins.createWindow() so the window is opened over the whole layout.
w1 = parent.dhxWins.createWindow(
Then there goes layout in window, tabbar and toolbar.
dhxLayoutInWindow = w1.attachLayout(“2E”);

dhxTabbar = dhxLayoutInWindow.cells(“b”).attachTabbar();

dhxToolbar = dhxLayoutInWindow.attachToolbar();
I need to get div innerhtml from opened tab so it can be used in window’s layout cell. If I open window over 1 cell of master layout-it works like dhxTabbar.cells… etc. But when I open the window over the whole master layout-I can’t access tabbar cell content this way.
I’ve managed to do it with jquery like
$(“body”, top.document).parents().find(“iframe”).each(function (n, el) {
var a = $(el).contents().find("#id22"); //id22 is id of div
if ($(a).length > 0) {
cislo = $(a).html();
return cislo;
but there must a better solution. Thank you.

The iframe object can be got bt getFrame() method:

var ifrm = dhxTabbar.cells(tabId).getFrame();
var doc = ifrm.contentWindow.document;

Thank you for your asnwer.
I knew about getting the frame this way, but as I wrote - I can’t access dhxTabbar like this when I create modal window over whole master layout, even when the code is in the one page. It just says that its not a function, so it looks like it tries to execute code from parent page.

we need attached completed demo that demonstrates the problem

Thank you for your answer. I’ve attached the demo with the problem.
test.rar (829 KB)

Please have a look at the article: … leted_demo

This is about demo creation. The demo should not contain any server-side scripts.

I’ve replaced all aspx and master pages by html and attached demo again.
To reproduce the problem: click on katalog in menu, then click the button in frame b. After that there is a button in the top right corner, which onclick is trying to get the div’s content in tabbar. Thank you.
test.rar (831 KB)

There is the problem in IE with window appearing. Please move windows initialization into the onload handler:

window.onload = function() {
dhxWins = new dhtmlXWindows();

Regarding tab content - the version of dhtmlxcontainer.js that you use doesn’t support getFrame() method.

Thank you for your answer.
I downloaded the latest version from your website and now I’m waiting for pro pack, which should be already paid or soon. Where can I get the version I need? I’ve found this file even before i started this topic in the forum but it didn’t help.

Please try attached library (7.46 KB)

Thank you very much for your help.
Why don’t you upload this file on the server? So ppl will download the right version w/out solving this problem for 2 weeks.

The Suite package already contains the fixed dhtmlxcontainer.js.