Proper way to switch displays in a layout

I am trying to design an interface that is a 2U with a toolbar and a statusbar. In layout cell “a” I have an accordion object and within each accordion panel I have A tags which are links to bring up different displays in the layout “b” cell.

For the displays, I have simply defined DIVs that have html elements. When I click on one of the links in the accordion, it attaches that div to the “b” layout cell. That works time the first time a link is clicked, but if I click another link and then come back to a link that has already been displayed, the “b” cell goes blank and in the error console I get a message like:
Error: uncaught exception: [Exception… “Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.appendChild]” nsresult: “0x80004003 (NS_ERROR_INVALID_POINTER)” location: “JS frame :: file:///c:/ajaxdev/dhtmlx/dhtmlxAccordion/codebase/dhtmlxcontainer.js :: anonymous :: line 9” data: no]

Obviously I am not going about this the right way with doing the DIV attachments. I was wondering if someone could tell me what a correct way would be.

I figured it out. Call detachobject() before attaching a new object and the DIV switching works.

Hello.

Sounds good.

Also you may try our new “views” feature
docs.dhtmlx.com/doku.php?id=dhtm … yout_views

It allows quick switching any kind content (also menu, toolbar, other dhtmlx components).