Go to specific tab from an external link

Hi,



If I want to go to specific tab from an external link, how would I set througth with using html anchor

Tab #3



what should i have under the javascript function, where the page does not initial the tabbar.






Hello,


In this case you should open the page with tabbar and set the necessary tab active (after tabbar intialization):


tabbar.setTabActive(tab_id);


yes, but that is only limited if they are under the same tabbar.



let say I have one tabbar at each page(page1 and pages2), each page has its own tabbar.



it is possible for me to go from page1-tab2 to page2-tab4 ?



 


Do you mean that there are pages inside your tabbar (inside tabbar iframes) and you want to call tabbar method from these pages ?


If you do, tabbar method can be called from iframe as follows:


parent.tabbar.setTabActive(tab_id);


Possibly the following can be used:


window.open(page1?tab_id=tab2_id);


or


window.open(page2?tab_id=tab4_id);


It means that you can path the id of the tab which must be open as the parameter.


it works now, but another problem arise.



When I switch the tab within the same page, my url address still got the same one that has my tab_id=tab 4



I would like to have the parent url rather than the one with tad_id parameter once tab is being switch ??



 



 


You can reload page using following method:


tabbar.setContentHref(tab_id,new_href)

I have a similar problem. I would like to click a link on a html page opened in one tab to open another tab in the same tabbar. I am using tabbar.setHrefMode(“ajax-html”); to show different html pages for each tab.

Example:

tabbar.html opens with tab a1 setTabActive so tab_a1.html page shows. On the a1 page there is a link to switch to tab a2.

I’ve tried onclick=“window.open(‘tabbar.html?tab_id=a2’);” but that does several things wrong. First it opens a new window, and I want to switch tabs. Secondly when it opens the tabbar.html page the setTabActive kicks in an shows tab_a1.html instead of tab_a2.html. How can I have the tabbar.html page show tab a1 on initial loading but go to specific tabs if linked from inside any of those tab_aX.html pages or externally from another page?

Why don’t you want to use setTabActive method to show other tabs instead of window.open:

onclick=“tabbar.setTabActive(‘a2’)”

??

perfect, thanks!