summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpfspot.js b/phpfspot.js
index 06f20e0..588298a 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -315,9 +315,11 @@ function nextSlide()
function autoBrowse()
{
- var next_link = document.getElementById('next_link').href;
- window.location.href = next_link;
- setTimeout("autoBrowse()", 5000);
+ if(document.getElementById('next_link')) {
+ var next_link = document.getElementById('next_link').href;
+ window.location.href = next_link;
+ setTimeout("autoBrowse()", 5000);
+ }
}
var startup = 1;