summaryrefslogtreecommitdiffstats
path: root/templates/javascript_refresh.inc.php
blob: 1da0c76b38184d00101e10e8348f72e758e6042c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script type="text/javascript" language="javascript">
<!-- Begin
// Set refresh interval (in seconds)
var refreshinterval=<?php echo conf('refresh_limit'); ?>;

function doLoad()
{
    // the timeout value should be the same as in the "refresh" meta-tag
    setTimeout( "refresh()", refreshinterval*1000 );
}

function refresh()
{
    //  This version of the refresh function will cause a new
    //  entry in the visitor's history.  It is provided for
    //  those browsers that only support JavaScript 1.0.
    //
    ajaxPut('<?php echo $ajax_url; ?>');
    doLoad();
}

// start with page-load
window.onload=doLoad();
// End -->
</script>