Get id of selected tab in TabContainer

var tabs = dijit.byId("#{id:djContentPane1}");

    console.log("selected Tab: ",;

The code can be tested in the Extension Library.  Paste the code above into the OnClientLoad event of /Core_DojoLayout.xsp.
Then open the page in Firefox (Firebug enabled) and click on the tabs in the TabContainer example.

The output should be sth. like this

selected Tab: view:_id1:cc4cconeuilayout:OneUIMainAreaCallback:djContentPane1:djTabPane2
selected Tab: view:_id1:cc4cconeuilayout:OneUIMainAreaCallback:djContentPane1:djTabPane1

JavaScript (Client)
Ulrich Krause
November 30, 2011 1:36 AM

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.

No comments yetLogin first to comment...