Okay I have a few list boxes that im loading links into from an xml file. I can get the text for the link loaded in fine by im doing something wrong when it comes to actually making the link. I cant get the links to work.
Here is my as
///////////xml code///////////////////////////
var vlist:XML = new XML;
vlist.ignoreWhite = true;
vlist.onLoad = function(){
var items:Array = this.firstChild.childNodes;
for(i=0;i<items.length;i++){
if(items*.attributes.type == "policy"){
policylist.addItem(items*.attributes.name,items*.attributes.url);
}
if(items*.attributes.type == "procedure"){
procedurelist.addItem(items*.attributes.name,items*.attributes.url);
}
if(items*.attributes.type == "link"){
linklist.addItem(items*.attributes.name,items*.attributes.url);
}
if(items*.attributes.type == "download"){
downloadlist.addItem(items*.attributes.name,items*.attributes.url);
}
}
}
var pol:Object = new Object();
pol.change = function(){
getURL(policylist.getItemAt(policylist.selectedIndex).url);
policylist.addEventListener("change",pol);
}
vlist.load("../itnavigation.xml");
/////////////////////////////////////////////
Here is my xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<links>
<item type="policy" name="policy1" url="policies/policy1.pdf" />
<item type="policy" name="policy2" url="policies/policy2.pdf" />
<item type="procedure" name="policy3" url="policies/policy1.pdf" />
<item type="procedure" name="policy4" url="policies/policy2.pdf" />
<item type="link" name="policy5" url="policies/policy1.pdf" />
<item type="link" name="policy6" url="policies/policy2.pdf" />
<item type="download" name="policy7" url="policies/policy1.pdf" />
<item type="download" name="policy8" url="policies/policy2.pdf" />
</links>
thanks in advance