I am trying to use the timeout function within a jsp. But it doesn't work.
<script language="javascript">
function hol_logs() {
var myAjax = new Ajax.Request(
"getlogs.jsp",
{ method: 'get',parameters: 'jobId=<%=job%>', onComplete: zeige_logs }
);
setTimeOut("hol_logs()", 10000);
}
function zeige_logs( originalRequest ) {
$('output').innerHTML = originalRequest.responseText;
}
hol_logs();
</script>
As you can see, the function hol_logs is supposed to be called every 10sec ( i also tried it without the (), with no effect). It defently gets executed once ( at the end of the script), but the setTimeOut doesn't seem to work.