Desde ya muchas gracias

| |||
xml has no properties!!! Quisiera saber que significa eso, tengo el codigo q hace q al ingrsar una letra me traiga datos de la BD q comienan con l aletra ingresado y me da ese error, o el aotro q dice : la instruccion XML no esta definida en la entida d externa. o algo asi. Desde ya muchas gracias ![]() |
| |||
Re: xml has no properties!!! Si posteas el código que te produce conflictos seguramente podamos darte una mano con el tema. Puedes probar también debugger con la extensión FireBug del Firefox. Saludos. |
| |||
Re: xml has no properties!!! Event.observe(window, "load", window_load, false); 2function window_load() 3 { 4 Event.observe(document.getElementById("BUSCAR"), "keyup", buscar_empleado, false); 5 } 6 7function buscar_empleado() 8{ 9 var lstEmpleados=document.getElementById("EMPLEADOS"); 10 lstEmpleados.value="0"; 11 for (i=lstEmpleados.length;i>0;i--) 12 { 13 lstEmpleados.removeChild(lstEmpleados.lastChild); 14 } 15 16 if (document.getElementById("BUSCAR").value != '') 17 { 18 ajax=NuevoAJAX(); 19 ajax.open("GET", "empleado_Ale_ajax.php?rutina=trae_empleados&busca r_por=" + document.getElementById("BUSCAR_POR").value + "&buscar=" + document.getElementById("BUSCAR").value, true); 20 ajax.onreadystatechange=function() 21 { 22 if (ajax.readyState==4) 23 { 24 if (ajax.status==200) 25 { 26 var xml=ajax.responseXML; 27 //var xml=ajax.responseText; 28 //alert(xml); 29 var lstEmpleados=document.getElementById("EMPLEADOS"); 30 var rs=xml.getElementsByTagName("rowdatos");() 31 for (i=0;i<rs.length;i++) 32 { 33 nuevaopcion=document.createElement("option"); 34 valor=document.createAttribute("value"); 35 valor.value=rs[i].childNodes[0].firstChild.nodeValue; 36 nuevaopcion.setAttributeNode(valor); 37 nuevaopcion.appendChild(document.createTextNode(rs[i].childNodes[2].firstChild.nodeValue + " - " + rs[i].childNodes[1].firstChild.nodeValue)); 38 lstEmpleados.appendChild(nuevaopcion); 39 } 40 } 41 } 42 } 43 ajax.send(null); 44 } 45} 46 47 |
| |||
Re: xml has no properties!!! Event.observe(window, "load", window_load, false); 2function window_load() 3 { 4 Event.observe(document.getElementById("BUSCAR"), "keyup", buscar_empleado, false); 5 } 6 7function buscar_empleado() 8{ 9 var lstEmpleados=document.getElementById("EMPLEADOS"); 10 lstEmpleados.value="0"; 11 for (i=lstEmpleados.length;i>0;i--) 12 { 13 lstEmpleados.removeChild(lstEmpleados.lastChild); 14 } 15 16 if (document.getElementById("BUSCAR").value != '') 17 { 18 ajax=NuevoAJAX(); 19 ajax.open("GET", "empleado_Ale_ajax.php?rutina=trae_empleados&busca r_por=" + document.getElementById("BUSCAR_POR").value + "&buscar=" + document.getElementById("BUSCAR").value, true); 20 ajax.onreadystatechange=function() 21 { 22 if (ajax.readyState==4) 23 { 24 if (ajax.status==200) 25 { 26 var xml=ajax.responseXML; 27 //var xml=ajax.responseText; 28 //alert(xml); 29 var lstEmpleados=document.getElementById("EMPLEADOS"); 30 var rs=xml.getElementsByTagName("rowdatos");(AQUI ME DA EL ERROR) 31 for (i=0;i<rs.length;i++) 32 { 33 nuevaopcion=document.createElement("option"); 34 valor=document.createAttribute("value"); 35 valor.value=rs[i].childNodes[0].firstChild.nodeValue; 36 nuevaopcion.setAttributeNode(valor); 37 nuevaopcion.appendChild(document.createTextNode(rs[i].childNodes[2].firstChild.nodeValue + " - " + rs[i].childNodes[1].firstChild.nodeValue)); 38 lstEmpleados.appendChild(nuevaopcion); 39 } 40 } 41 } 42 } 43 ajax.send(null); 44 } 45} 46 47 |