Ver Mensaje Individual
  #7 (permalink)  
Antiguo 20/10/2012, 12:28
Avatar de fedefrankk
fedefrankk
 
Fecha de Ingreso: agosto-2007
Mensajes: 871
Antigüedad: 16 años, 8 meses
Puntos: 7
Pregunta Respuesta: Traer una foto en un div

Hola.. no hay caso, lo hice como me dijiste..

en la funcion ó en la conexion esta el error supongo..

aca dejo codigo alomejor es una tontera...

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.     function ejec(pagina,capa){
  3.    
  4.  
  5.     var capa;
  6.     var conexion;
  7.     if (window.XMLHttpRequest){
  8.         conexion = new XMLHttpRequest();
  9.     }else{
  10.           conexion=new ActiveXObject("Microsoft.XMLHTTP")
  11.     }
  12.   conexion.onreadystatechange=function(){
  13.       if(conexion.readyState==4 && conexion.status==200){
  14.      document.getElementById("a").innerHTML=conexion.responseText;
  15.      document.getElementById("b").innerHTML=capa;
  16.  
  17.  }
  18.   }
  19.     conexion.open("POST",pagina,capa,true);
  20.     conexion.send(); //
  21.     }
  22. </script>
  23. </head>
  24.  
  25. <body>
  26.  
  27. <li><a href="#" onclick="ejec('tratamientos/alisado.html','a');ejec('tratamientos/01.html','b')">ALIZADO DEFINITIVO</a></li>
  28.  
  29.  
  30. <div class="centro_img" id="b"></div>
  31. <div class="texto_t1" id="a"></div>

y en mi archivo 01.html

Código HTML:
Ver original
  1. <img src="fede.jpg" width="181" height="448" />

Saludos y muchas gracias.!!!

Fede