Foros del Web » Programando para Internet » Javascript » Frameworks JS »

xml has no properties!!!

Estas en el tema de xml has no properties!!! en el foro de Frameworks JS en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 18/01/2007, 17:42
 
Fecha de Ingreso: enero-2007
Mensajes: 6
Antigüedad: 17 años, 3 meses
Puntos: 0
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
  #2 (permalink)  
Antiguo 19/01/2007, 01:21
 
Fecha de Ingreso: agosto-2005
Ubicación: Argentina, Capital Federal
Mensajes: 435
Antigüedad: 18 años, 8 meses
Puntos: 2
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.
__________________
R4DS en español | R4DS en inglés
  #3 (permalink)  
Antiguo 05/02/2007, 09:15
 
Fecha de Ingreso: enero-2007
Mensajes: 6
Antigüedad: 17 años, 3 meses
Puntos: 0
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
  #4 (permalink)  
Antiguo 05/02/2007, 09:18
 
Fecha de Ingreso: enero-2007
Mensajes: 6
Antigüedad: 17 años, 3 meses
Puntos: 0
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
  #5 (permalink)  
Antiguo 05/02/2007, 09:21
 
Fecha de Ingreso: enero-2007
Mensajes: 6
Antigüedad: 17 años, 3 meses
Puntos: 0
Re: xml has no properties!!!

AHORA TENGO PROBLEMAS CON ESTO "xml.getElementsByTagName is not a function" COMO LO SOLUCIONO
  #6 (permalink)  
Antiguo 07/02/2007, 19:44
 
Fecha de Ingreso: octubre-2006
Mensajes: 31
Antigüedad: 17 años, 6 meses
Puntos: 0
Re: xml has no properties!!!

<rowdatos> alalallalalalalalala </rowdatos>
  #7 (permalink)  
Antiguo 07/02/2007, 19:48
 
Fecha de Ingreso: octubre-2006
Mensajes: 31
Antigüedad: 17 años, 6 meses
Puntos: 0
Re: xml has no properties!!!

perdon era <input type="text" name="rowdatos" value="lalalallalalalala">
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:42.