Tabbar.tabWindow(tabbar.getActiveTab()).myFunction()

Hello,
I have a problem with the code Tabbar.tabWindow(Tabbar.getActiveTab()).myFunction()
Tabbar is a Tabbar :wink: initialized by calling .attachTabbar() of a dhtmlXLayoutObject - and it is working fine. I have attached a URL to it viaTabbar.addTab("t0", "foo"); Tabbar.setContentHref("t0", "test.aspx"); Tabbar.setTabActive("t0");. “test.aspx” contains the function “myFunction”, so I should be able to call it like this, shouldn’t I?

I get the following message: (Google Chrome’s console) Uncaught TypeError: Cannot read property 'contentWindow' of undefined (line 54 in “dhtmlxtabbar.js”)

What am I doing wrong?
Thank you, BjöNi

P.S.: I’m from Germany, so my English might not be the best :wink:

I searched a bit in the code of the dhtmlxtabbar.js and found the following way to access a function: Tabbar._content[Tabbar.getActiveTab()].getElementsByTagName("div")[0].getElementsByTagName("iframe")[0].contentWindow.myFunction())

There is a method tabWindow() - you can use it too.
docs.dhtmlx.com/doku.php?id=dhtm 
 _tabwindow

Hm, that’s what I wrote in my first Post. And it doesn’t work :frowning:

It doesn’t work, if you use container.js file. They aren’t used together.

But I wrote

, so I need the container.js for the LayoutObject?

But the solution of Post #2 works, so it’s OK, I think.