Skip to main content

I have two pages …When i select some record in first page , then second page(it includes in first page) renders according to id passed from First page and display the record accoring to Id…I have created a Tab set(3 tabs are present ) in second page…so when i select record from first page then i want directly 3rd tab  data shown…  but Initially (first time ) when page loads then 1st Tab open…

Currently i Have used Javascript (Inline -Snippet)

code is –
skuid.$(function(){   var TABSET_ID = ‘TabSetIdDisplayDetail’;
var TAB_ID = ‘MediaAttachId’;

var $ = skuid.$;
var tabset = $(‘#’+TABSET_ID);
var tabPanels = tabset.children(‘.ui-tabs-panel’);
var targetTabIndex = tabPanels.filter(‘#’+TAB_ID).index();
tabset.tabs(‘option’,‘active’,targetTabIndex); 

});



But it always open 3rd Tab on Page Load…
Intially i want 1st Tab open…but during page is open and i have select 3rd tab …i want to open always 3rd tab …on selection of record on first page



I’m not sure I understand.  Do you want the third tab to open every time?  Or the first tab to open every time? 

If you want first tab - that is default behavior.  
If you want third tab - some javascript like what you have written will work.  Tab memory does not work in page includes. 

You could also refactor your page so that all the contents are in the same page.  (No page include).  Then tab memory would be operative. 


First time when page load i want default behaviour …ie. First Tab open as usual…
But when i select the Third Tab … and at that time i have select the other record which is in Queue list of First Page…which refresh my other Include page  …so , at that time i want to open Third Tab…Currently Queue functonality in First Page … and Tab set in second included one page…



Not sure if this will help of not, but I think that if you give your third tab a unique id such as MyThirdTab, you can add #MyThirdTab to the url parameters that you send to the page include and it will show the third tab.

For your use case you might have to have the queue run some javascript to decide which tab to show when you refresh the include. If you want the first tab, just load the include as normal, if you want the third tab, add #MyThirdTab parameters you pass.


The problem is that the #MyThirdTab url parameter is not injected into the Page Include query string.  In the context of the page include it fails…


Ah, too bad. Sorry for leading you astray, paras.


Reply