Código:
var req; var target; var isIE; function initRequest(url) { if (window.XMLHttpRequest) req = new XMLHttpRequest(); else if (window.ActiveXObject) { isIE = true; req = new ActiveXObject("Microsoft.XMLHTTP"); } } function processRequest() { if (req.readyState == 4) { if (req.status == 200) { alert("response--->"+req.responseText); alert("prueba--->"+req.responseXML.getElementsByTagName("nota").length); alert("prueba2-->"+req.responseXML.getElementsByTagName("nota").item(1).firstChild.data); alert("prueba2-->"+req.responseXML.getElementsByTagName("nota")[0].childNodes[0].nodeValue); } } } function getChangeCombo() { var form = document.ibeExelNotas; for(var i=0; i < form.Nota.length; i++){ if(form.Nota[i].checked) break; } var url = "notascargo?id=" + form.Nota[i].value + "&orgId=" + form.orgId.value; initRequest(url); req.onreadystatechange = processRequest; req.open("GET", url, true); req.send(null); }