Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/10/2010, 08:30
felipe12357
 
Fecha de Ingreso: junio-2010
Mensajes: 168
Antigüedad: 13 años, 10 meses
Puntos: 3
Respuesta: acutalizar sin parpadear

hola he modificado el codigo ya q yo no utilizo mysql como bd (utilizo sqlite) por ahora funciona bien aun q aun no lo he testeado con imagenes para ello quiero primero automatizar el proceso, lo intente tal y como me dijo emprear, modifique el codigo html y quedo asi:

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Consulta Registro con AJAX</title>



<!-- referenciamos al archivo ajax.js donde se encuentra nuestra funcion objetoAjax-->

<script language="JavaScript" type="text/javascript" src="ajax.js"></script>

</head>

<body>

<p>Consultar registros con ajax</p>



<!-- En "onsubmit" escribimos la función 'MostrarConsulta' que creamos en javascript, con su parametro que es el archivo que vamos a mostrar, en este caso 'consulta.php'-->

<form name="consulta" action="" onsubmit="MostrarConsulta('consulta.php'); return false">

<label>

<input type="submit" value="Consultar" />

</label>

</form>

<div id="resultado">
<script type="text/javascript">
[CDATA[
setInterval("mostrar_consulta('consulta.php')", 5000);
// tiempo en milisegundos
]]>
</script>


</div>

</body>

</html>

SIN EMBARGO NO LOGRO Q LOS DATOS DE LA BASE DE DATOS ACTUALICEN AUTOMATICAMENTE, no se si cometi algun error, espero me puedan ayudar gracias