Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/09/2008, 18:05
javsoft
 
Fecha de Ingreso: junio-2006
Mensajes: 126
Antigüedad: 18 años, 8 meses
Puntos: 0
Pregunta Ayuda con esta funcion

Tengo dos archivos

dentro.php y tiempo.php

En el archivo dentro.php invoco a tiempo.php de la siguiente manera

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<?php
include("include/tiempo.php");
?>

</head>
<body onload="CountDown()">

y en tiempo.php tengo lo siguiente:

<script>
<!--
function CountDown() {
<?php
$objeto = extrac_sesion();
echo $tiempo = time() - $objeto->ObtenerTiempo();
?>
var TimeOut = <? echo $tiempo ?>;
if(TimeOut > 1800){
window.location.href = "include/salir_s.inc.php?inac=0"; //llamamos a archivo que destruye session.
}
else{
setTimeout(CountDown,1000)
}
}//FIN DE FUNCION
-->
</script>

lo que me gustaria saber es por que la funcion setTimeout(CountDown,1000) no me esta funcionando