From 9bc01791641ed3e4c52dddcb0991fa28bb2d63b5 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 21 Jul 2007 17:33:23 +0000 Subject: [PATCH] issue56, check if next-link-anchor is still here in case user decided to click around and leave the single photo view git-svn-id: file:///var/lib/svn/phpfspot/trunk@234 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.js | 8 +++++--- 1 file 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; -- 2.34.1