:: Forum >> Version 2 >>

getting values from 2 tab components - problem

Ok, I'm probably just being stupid (wouldn't be the first time).

I have 2 Tab components I'm displaying:

// Create Upgrade Tabs
var objTab = new AW.UI.Tabs;
objTab.setId("myTabs");
objTab.setItemText(["Baseline""TO Initiated""Network""All"]);
objTab.setSelectedItems([3]);
objTab.setSize(46020);
objTab.onItemClicked = function(eventindex){ 
    
loadXML(PITab.getSelectedIndex(), index);
};
    
// Create Planned/InService Tabs
var PITab = new AW.UI.Tabs;
PITab.setId("TypeTabs");
PITab.setItemText(["Planned""IS Pre Jan 2006""IS Post Dec 2005"]);
PITab.setSize(31020);
PITab.setSelectedItems([0]);
PITab.setItemImage(["ep","is","is"]);
PITab.onItemClicked = function(eventindex){ 
    
loadXML(indexobjTab.getSelectedIndex());
};
//this function actually is in the head area of the webpage - but I'm putting it here so you can see it)

function loadXML(PIOB) {
     
alert(PIOB)l
}
 
I need some way to get (in the loadXML function) BOTH tab compoents values so I can concat some information to load an appropriate XML data file. The XML file name is dependent on the index value of both tabs components.

I'd actually like to do it in the loadXML function. I'm sure it is easy, but it is eluding me at the moment and really confusing me.

I guess the better question for the above is "from another javascript function, how do I get the selected tab index of the tab component?"

Any help would be appreciated. I've tried a number of mechanisms.
Carl
Monday, July 16, 2007
oh, the "alert" in the loadXML --- typo ---

it is: alert(PI, OB);
Carl
Monday, July 16, 2007
You should use getCurrentItem() method.
Alex (ActiveWidgets)
Monday, July 16, 2007



This topic is archived.

Back to support forum

Forum search