diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-21 16:38:27 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-21 16:38:27 +0000 |
commit | fbab0ebea531927baf98e6144599057db464c49b (patch) | |
tree | 94d18a10ad3f4cb2b6a7f5416524191f0bb378a5 /templates/javascript_refresh.inc.php | |
parent | 280ee86ed799fbc39139c46b49d43cfc150ddae4 (diff) | |
download | ampache-fbab0ebea531927baf98e6144599057db464c49b.tar.gz ampache-fbab0ebea531927baf98e6144599057db464c49b.tar.bz2 ampache-fbab0ebea531927baf98e6144599057db464c49b.zip |
fixed nowplaying refresh issues and switched it to div layout
Diffstat (limited to 'templates/javascript_refresh.inc.php')
-rw-r--r-- | templates/javascript_refresh.inc.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/templates/javascript_refresh.inc.php b/templates/javascript_refresh.inc.php new file mode 100644 index 00000000..6fbdd9b6 --- /dev/null +++ b/templates/javascript_refresh.inc.php @@ -0,0 +1,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; ?>','<?php echo $ajax_object; ?>'); + doLoad(); +} + +// start with page-load +window.onload=doLoad(); +// End --> +</script> + |