
24/11/2009, 20:07
|
| | Fecha de Ingreso: febrero-2009
Mensajes: 44
Antigüedad: 16 años Puntos: 2 | |
Respuesta: Problema con un return Prueba con
createRequestObject = function(){
var peticion;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
peticion = new ActiveXObject("Microsoft.XMLHTTP");
}else{
peticion = new XMLHttpRequest();
}
return peticion;
}
var http = new Array();
function ObtDatos(url){
var act = new Date();
http[act] = new createRequestObject();
http[act].open('get', url);
http[act].onreadystatechange = function() {
if (http[act].readyState == 4) {
if (http[act].status == 200 || http[act].status == 304) {
var texto;
texto = http[act].responseText;
return texto;
}
}
}
http[act].send(null);
}
Saludos |