Ver Mensaje Individual
  #16 (permalink)  
Antiguo 27/11/2015, 07:59
rprado2008
 
Fecha de Ingreso: septiembre-2015
Mensajes: 39
Antigüedad: 8 años, 7 meses
Puntos: 0
Respuesta: capturar valor de un <div> ajax

voy a colocarlo por partes:
Código PHP:
Ver original
  1. <?php
  2. include "conexion.php";
  3. //esta es mi conexion a la bd, funciona sin problemas
  4. ?>
  5. <html>
  6. <head>
  7. <script src="ajax.js">
  8. //este script es uno como los que hay en internet, está funcional
  9. </script>
  10. <script>
  11. function myFunction(str)
  12. {
  13. loadDoc("q="+str,"proc.php",function()
  14.   {
  15.   if (xmlhttp.readyState==4 && xmlhttp.status==200)
  16.     {
  17.     document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
  18.     }
  19.   });
  20. }
  21. function myFunction2(str)
  22. {
  23. loadDoc("r="+str,"proc22.php",function()
  24.   {
  25.   if (xmlhttp.readyState==4 && xmlhttp.status==200)
  26.     {
  27.     document.getElementById("myDiv2").innerHTML=xmlhttp.responseText;
  28.     }
  29.   });
  30. }
  31. </script>
  32. </head>
  33. <body>
  34. <h2>- PRUEBA - </h2>

// aqui debe venir la siguiente parte