summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-21 17:33:23 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-21 17:33:23 +0000
commit9bc01791641ed3e4c52dddcb0991fa28bb2d63b5 (patch)
treebab028423b1d9b308dc4fe4398bbc088c6247ee3
parent70704d20a135f84e7d18072a883807ca5642b1f2 (diff)
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
-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;