Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/05/2013, 05:01
Avatar de satjaen
satjaen
 
Fecha de Ingreso: septiembre-2012
Ubicación: Jaén (Andalucía)
Mensajes: 893
Antigüedad: 11 años, 8 meses
Puntos: 10
Respuesta: Refrescar la pantalla cada cierto tiempo automaticamente.

Cita:
Iniciado por alberto510a Ver Mensaje
Hola.

Con html puedes hacer esto sin necesidad de javascript.

Código HTML:
Ver original
  1. <meta http-equiv="refresh" content="5; url=mipagina.html">

Como ves es una meta de tipo refresh, con el tiempo que quieras y la url.

Saludos
Si, gracias pero el problema es que tengo un boton para calcular la ruta y claro tengo que volver a pulsar. Se puede hacer que tambien se llame a la funcion?

Lo he puesto así:

Código Javascript:
Ver original
  1. <meta http-equiv="refresh" content="5; url=ubicacionavisos.php?id_aviso=<?php echo $row_Recordset1['id_aviso']; ?>">

Y la funcion para calcular la ruta:

Código Javascript:
Ver original
  1. function calcRoute() {
  2.  
  3.                                                
  4.  
  5.         var start = initialLocation;
  6.  
  7. var end = "<?php echo utf8_encode($row_Recordset1['localidad']); ?><?php echo utf8_encode($row_Recordset1['calle']); ?>";                
  8.  
  9.                                 var request = {
  10.  
  11.                     origin:start,
  12.  
  13.                     destination:end,
  14.  
  15.                     travelMode: google.maps.DirectionsTravelMode.DRIVING
  16.  
  17.                 };
  18.  
  19.                
  20.  
  21.                 directionsService.route(request, function(response, status) {
  22.  
  23.                     if (status == google.maps.DirectionsStatus.OK) {
  24.  
  25.                         directionsDisplay.setDirections(response);
  26.  
  27.                         $('#itinerario').show();
  28.  
  29.                     }
  30.  
  31.                 });      
  32.  
  33.             }

Gracias