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

return xmlhttp.responseText

Estas en el tema de return xmlhttp.responseText en el foro de Frameworks JS en Foros del Web. HOLA: AHORA EL PROBLEMA QUE TENGO ES QUE NO DEVUELVE LA INFORMACION ENVIADA DEL SERVIDOR PARA PODRER MANEJARLA DESDE OTRA FUNCION, AQUI ESTÁ EL CODIGO ...
  #1 (permalink)  
Antiguo 18/07/2006, 19:24
 
Fecha de Ingreso: mayo-2004
Mensajes: 6
Antigüedad: 20 años
Puntos: 0
return xmlhttp.responseText

HOLA:

AHORA EL PROBLEMA QUE TENGO ES QUE NO DEVUELVE LA INFORMACION ENVIADA DEL SERVIDOR PARA PODRER MANEJARLA DESDE OTRA FUNCION, AQUI ESTÁ EL CODIGO

MIL GRACIAS

function prueba_response(){

cadena = new Array();
for(x=0;x<document.getElementsByName('cantidad[]').length;x++)
{
cadena= cadena + 'cantidad[]='+document.getElementsByName('cantidad[]')[x].value+'&';
}

xmlhttp = response();
xmlhttp.open("POST", "guardar.ink.php",true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
var variables = cadena;
xmlhttp.send(variables);
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
return xmlhttp.responseText;
}
}
}
  #2 (permalink)  
Antiguo 19/07/2006, 07:01
 
Fecha de Ingreso: febrero-2005
Mensajes: 98
Antigüedad: 19 años, 2 meses
Puntos: 0
Es el mismo problema que tengo incluso lo comenté aquí: http://www.forosdelweb.com/f127/retornar-responsetext-410061/
Como te podrás dar cuenta me dieron una respuesta no tan buena...
aunque la unica forma que encontré fue almacenar el responseText en una variable global y ya luego lo podía utilizar en cualquier otra función... no tienes que retornar el responseText porque no te funcionará.
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 11:25.