Tabbar SetContent issue

I have a page with with a tabbar. The tabbar has 4 tabs. One of the tabs has a tabbar attached.

General Code Example:

I am getting this error:

Error: uncaught exception: [Exception… “Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.appendChild]” nsresult: “0x80004003 (NS_ERROR_INVALID_POINTER)” location: “JS frame :: localhost:8080/TrunacyWatch/dhtm … ntainer.js :: anonymous :: line 10” data: no]

I know it is coming from one of this lines of code because if i comment them out it work great.
tabbar2.setContent(“b1”, “survey_1”);
tabbar2.setContent(“b2”, “survey_2”);
tabbar2.setContent(“b3”, “survey_3”);

It’s seems to be not locating the inner div called survey_? that are located in the html_4. Any help to work around this would be greatly appreciated.

There are several mistakes in your code:

instead of

Moreover these DIVs shouldn’t be placed into html_4 container.