Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/09/2011, 12:30
Avatar de livemusic
livemusic
 
Fecha de Ingreso: abril-2011
Ubicación: Lima - Chorrillos
Mensajes: 150
Antigüedad: 13 años
Puntos: 18
Información Respuesta: modificar linea ajax

... me comentas si salio ...

Código Javascript:
Ver original
  1. function loadurl(url,id){
  2.     var pagecnx = createXMLHttpRequest();
  3.     pagecnx.onreadystatechange=function(){
  4.  
  5.     if (pagecnx.readyState == 4 && (pagecnx.status==200 || window.location.href.indexOf("http")==-1))
  6.         document.getElementById(id).innerHTML=pagecnx.resp onseText;
  7.     }else if (pagecnx.readyState==1 || pagecnx.readyState==2 || pagecnx.readyState==3){
  8.         document.getElementById(capa).innerHTML = "<img src='img/loading.gif' align='center' /> Aguarde por favor...";
  9.     }
  10.    
  11.    
  12.     pagecnx.open('GET',url,true)
  13.     pagecnx.send(null)
  14. }
  15.  
  16. function loadurlkey(e,url,id){
  17.     tecla = (document.all) ? e.keyCode : e.which;
  18.     if (tecla==13)
  19.     loadurl(url,id);
  20. }
  21.  
  22. function createXMLHttpRequest(){
  23.     var xmlHttp=null;
  24.     if (window.ActiveXObject)
  25.     xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  26.     else if (window.XMLHttpRequest)
  27.     xmlHttp = new XMLHttpRequest();
  28.     return xmlHttp;
  29. }