Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/09/2011, 12:31
Avatar de angel2010
angel2010
 
Fecha de Ingreso: julio-2010
Ubicación: monagas
Mensajes: 131
Antigüedad: 13 años, 9 meses
Puntos: 2
llamar una imagen

hola a todos como no se de ajax estoy piendo un poco de su ayua como puedo llamar a una imagen donde esta este texto Aguarde por favor...


Código Javascript:
Ver original
  1. function ajaxFunction() {
  2.   var xmlHttp;
  3.  
  4.   try {
  5.    
  6.     xmlHttp=new XMLHttpRequest();
  7.     return xmlHttp;
  8.   } catch (e) {
  9.    
  10.     try {
  11.       xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  12.       return xmlHttp;
  13.     } catch (e) {
  14.      
  15.       try {
  16.         xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  17.         return xmlHttp;
  18.       } catch (e) {
  19.         alert("Tu navegador no soporta AJAX!");
  20.         return false;
  21.       }}}
  22. }
  23.  
  24.  
  25.  
  26.  
  27. function Enviar(_pagina,capa) {
  28.     var ajax;
  29.     ajax = ajaxFunction();
  30.     ajax.open("POST", _pagina, true);
  31.     ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  32.  
  33.     ajax.onreadystatechange = function() {
  34.         if (ajax.readyState==1){
  35.             document.getElementById(capa).innerHTML = "Aguarde por favor...";
  36.                  }
  37.         if (ajax.readyState == 4) {
  38.            
  39.                 document.getElementById(capa).innerHTML=ajax.responseText;
  40.              }}
  41.              
  42.     ajax.send(null);
  43. }