From: Andreas Unterkircher Date: Sat, 21 Jul 2007 17:33:23 +0000 (+0000) Subject: issue56, check if next-link-anchor is still here in case user decided to click around... X-Git-Tag: phpfspot-1.2~101 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=9bc01791641ed3e4c52dddcb0991fa28bb2d63b5;hp=70704d20a135f84e7d18072a883807ca5642b1f2 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 --- 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;