PDA

View Full Version : Sorting and dynamic listBox component


robotflying
03-20-2005, 06:46 AM
Hello all,

Could use some help. I am trying to create a set of drop down menus that will "narrow down" the list of items in my listBox components. The I have now is listed below. Presently it will dynamically change the items in the listBox, but not "narrow down" the list. I'm thinking, I may be going about this the wrong way. Any ideas?

Thanks in Advanced.


--------------------------------------------------
port_xml = new XML();
port_xml.load("works.xml");
port_xml.ignoreWhite = true;
port_xml.onLoad = function(success) {
if (success) {
rootNode = port_xml.firstChild;
for (var aNode = rootNode.firstChild; aNode != null; aNode=aNode.nextSibling) {
if (aNode.attributes.market == _root.lookMarket) {
list.addItem(aNode.attributes.name, aNode.attributes.desc);
} else if (aNode.attributes.year == _root.lookYear) {
list.addItem(aNode.attributes.name, aNode.attributes.desc);
} else if (aNode.attributes.market == _root.lookMarket && aNode.attributes.year == _root.lookYear) {
list.addItem(aNode.attributes.name, aNode.attributes.desc);
}
}
}
};