bueno, pues ya quedo resuelto, les dejo el codigo para que lo utilizen, es un combo box dependiente de otro cargando items dinamicamente por dos xmls, el segundo combo pinta informacion en un cuadro de texto ejoy =D
Código :
miXML = new XML();
miXML.ignoreWhite = true;
miXML.onLoad = parseXML;
miXML.load("/includes/functions/states.asp");
// --
function parseXML(succes) {
///miDataProvider = new Array();
// --
for (var bNode:XMLNode = miXML.firstChild.firstChild; bNode != null; bNode=bNode.nextSibling) {
//trace( bNode.childNodes[0].firstChild.nodeValue);
//miDataProvider.push(bNode.childNodes[1].firstChild.nodeValue);
miCombo.addItem(bNode.childNodes[1].firstChild.nodeValue, bNode.childNodes[0].firstChild.nodeValue);
}
}
function loadDealers(idState) {
miXML2 = new XML();
miXML2.ignoreWhite = true;
miXML2.onLoad = parseXML2;
miXML2.load("/includes/functions/dealersdata.asp?process=State&idstate="+idState);
function parseXML2(succes) {
for (var bNode:XMLNode = miXML2.firstChild.firstChild; bNode != null; bNode=bNode.nextSibling) {
miCombo2.addItem(bNode.childNodes[1].firstChild.nodeValue, bNode.childNodes[0].firstChild.nodeValue);
}
}
}
function loadDetail(bid) {
miXML2 = new XML();
miXML2.ignoreWhite = true;
miXML2.onLoad = parseXML3;
miXML2.load("http://ford07.mx.wunderman.com/includes/functions/dealersdata.asp?process=Detail&BID="+bid);
function parseXML3(succes) {
for (var bNode:XMLNode = miXML2.firstChild; bNode != null; bNode=bNode.nextSibling) {
trace(bNode.childNodes[0].firstChild.nodeValue);
nombre = (bNode.childNodes[1].firstChild.nodeValue);
direccion = (bNode.childNodes[2].firstChild.nodeValue);
zip = (bNode.childNodes[3].firstChild.nodeValue);
ciudad = (bNode.childNodes[4].firstChild.nodeValue);
estado = (bNode.childNodes[5].firstChild.nodeValue);
telefono = (bNode.childNodes[6].firstChild.nodeValue);
email = (bNode.childNodes[7].firstChild.nodeValue);
web = (bNode.childNodes[8].firstChild.nodeValue);
calidad = (bNode.childNodes[9].firstChild.nodeValue);
ovalo = (bNode.childNodes[10].firstChild.nodeValue);
svt = (bNode.childNodes[11].firstChild.nodeValue);
info = ("<p>"+nombre+"</p>"+"<p>"+direccion+"</p>"+"<p>"+zip+"</p>"+"<p>"+ciudad+"</p>"+"<p>"+estado+"</p>"+"<p>"+telefono+"</p>"+"<p>"+email+"</p>"+"<p>"+web+"</p>");
}
}
}
///+++-------
//miCombo.dataProvider = miDataProvider;
//indica el valor de cada estado
function listenerObject(evt) {
//trace(evt.target.value+" triggered");
if (evt.target == miCombo) {
eso = evt.target.value;
if (Number(eso)>0) {
loadDealers(eso);
}
}
//trace(evt.target);
if (evt.target == miCombo2) {
eso = evt.target.value;
//trace(eso);
loadDetail(eso);
}
}
//Creo un listener
miCombo.addEventListener("change", listenerObject);
//Creo un listener
miCombo2.addEventListener("change", listenerObject);