Categories | Question details Back To List | ||
creating a direct link to tab I am sorry I have lost the answer to this most basic question but I cannot remember the proper construction. How do I construct a link that navigates directly to the content of a particular tab? Would you please either direct me to the answer in the documentation or give me an example here? Thank you very much. Answer posted by Alex (support) on Mar 04, 2009 02:01 If you don't you iframe-based loading mode, the tab content are elements of the page and available by document.getElementById(id) method. In case of iframes loading mode, the window of tab content can be got using the tabWindow(tab_id) method. Answer posted by follow up to creating direct link to tab on Mar 04, 2009 07:18 Thanks but I need a sample, I think, because I can't quite see how to construct an event on a different page that will move to the page with the tabbar and start with a particular tab open that may or may not be the active tab. Here's the code that constructs the tabbar: <div id="a_tabbar" class="tab"></div> <script>Now, for example, I have a link on the homepage that links to the page with the above tabbar. I want the link to move to this page and start with the content of the a3 tab to be active. I am sure this needs to be an onclick event but I am not sure how to achieve this. What would the script look like and how would the onclick be constructed? I have tried many variations and they have all failed. Thanks very much. Answer posted by Alex (support) on Mar 04, 2009 08:04 What onclick do you mean ? Unfortunately, the provided description is not clear enough. If you mean tab onclick, tabbar provides onselect event whcih can be used. It occurs when tab selection changes: tabbar.setOnSelectHandler(function(tab_id,prev_tab_id){ ... return true }) In case of ajax mode the content of the tab is only available after loading. setOnTabContentLoaded method allows to set function which will be called after tab content loaded (it gets tab id as a parameter). Answer posted by Thanks very much on Mar 04, 2009 08:41 Thank you. Your comment helped provoke my thinking to achieve a solution. I appreciate it very much. |