Using Windows from Accordion

Sometimes while using accordion you may need to show a pop-up window. If windows .js/.css files are included on the page, there's no need to create an extra windows instance, as the accordion has one already (it is used for the "dock/undock" functionality)


// creating an accordion instance
var myAcc = new dhtmlXAccordion("accObj");
...
// creating a pop-up window from the accordion's windows instance
var popupWindow = myAcc.dhxWins.createWindow("popupWindow", ...);


If you're using the "dock/undock" functionality at the same time, you need to make sure your windows ids and the accordion's windows ids will not overwrite each other.


Remember: accordion uses the same ids for windows and for its cells. You've specified these ids by the addItem() method.


You can read more details here.

Back to top