Skip to content Skip to sidebar Skip to footer

Dojo: Select A Tab On Load Depending On Url Parameter

Is there a way to select a tab in a tab container upon load depending on a url parameter? I have tried the following but nothing seems to happen and the tab I want is not selected:

Solution 1:

For those that might have the same question, I got the answer off the dojo mailing list, have to pass the actual tab instead of just a string, as follows:

var tab = tabToSelect && dijit.byId(tabToSelect);
    if(tab){ dijit.byId("container").selectChild(tab)};

Works like a charm now!

Post a Comment for "Dojo: Select A Tab On Load Depending On Url Parameter"