WebSurfer
09-27-2012, 09:35 PM
Hi to you all,
I have a slideshow with links for each image (could also be imagemap). Here is a testrun (http://www.ayu-user.bplaced.net/testrunone/) - Script is below
In FF and Safari I can click on an image, get linked to that page, can read it and on browser's back button I get back to my slideshow EXACTLY WHERE I LEFT IT, SAME IMAGE.
In IE, Chrome and Konq the slideshow starts allover from the beginning.
It is very annoying because my slideshow stops at the last image and shows an imagemap with many links. No visitor will make it to the last link if he has to watch the slideshow each time from beginning on.
I read the thread from Ponder with answers from vwphillips and (of course) John (http://www.dynamicdrive.com/forums/showthread.php?69094-Stop-slideshow-from-starting-over) but hoped for an easier solution... like telling IE, Chrome and Konq to just behave like Firefox.
I am aware that starting the slideshow all over again might also be a feature, but in my case it's not wanted.
Does anybody have an idea why browsers behave so differently and what I can do to fix it? Do I have to use a pause function? Or can I do something to go dirctly to a certain (the last) image of the sildeshow?
Same issue with this completely different slideshow (http://reallysimpleworks.com/slideshow/) (second on page)
Thanks in advance for any support
(The best supporter gets... virtual beer?? No, real beer! The Octoberfest happens right in front of my door for the next 10 days :p Cheers )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title></title>
<style>
#slideshow {
position:relative;
}
#slideshow DIV {
position:absolute;
top:0;
left:0;
z-index:8;
opacity:0.6;
background-color: #006600;
}
#slideshow DIV.active {
z-index:10;
opacity:1.0;
}
#slideshow DIV.last-active {
z-index:9;
}
#slideshow DIV IMG {
height: 600px;
display: block;
border: 0;
}
#hover {
font-size: 18px;
margin: 20px;
background-color: yellow;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow DIV.active');
if ( $active.length == 0 ) $active = $('#slideshow DIV:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow DIV:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 800, function() {
$active.removeClass('active last-active');
});
}
jQuery(function($){
setInterval( "slideSwitch()", 2000 );
});
</script>
</head>
<body>
<map name="2" id="2">
<area shape="rect" coords="0,0,400,600" href="page-left.html" title="" target="_self" alt="" />
<area shape="rect" coords="400,0,800,600" href="page-right.html" title="" target="_self" alt="" />
</map>
<div id="slideshow">
<div class="active">
<div id="captionbar">Caption for image 1</div>
<img src="http://i284.photobucket.com/albums/ll12/lexxxijh/Beaches/Wallpaper-green-beach.jpg" alt="Slideshow Image 1" usemap="#2" />
</div>
<div>
<div id="captionbar">Caption for image 2</div>
<img src="http://upload.wikimedia.org/wikipedia/commons/b/ba/Venice_beach_panorama.jpg" alt="Slideshow Image 2" usemap="#2" />
</div>
<div>
<div id="captionbar">Caption for image 3</div>
<img src="http://latitudes.nu/wp-content/uploads/2011/09/Perhentian-Islands.jpg" alt="Slideshow Image 3" usemap="#2" />
</div>
<div>
<div id="captionbar">Caption for image 4</div>
<img src="http://www.my-miami-beach.de/miami-beach-fotos/gross/Wetter-und-Klima-in-Miami-Beach-Florida.jpg" alt="Slideshow Image 4" usemap="#2" />
</div>
</div>
</body>
</html>
I have a slideshow with links for each image (could also be imagemap). Here is a testrun (http://www.ayu-user.bplaced.net/testrunone/) - Script is below
In FF and Safari I can click on an image, get linked to that page, can read it and on browser's back button I get back to my slideshow EXACTLY WHERE I LEFT IT, SAME IMAGE.
In IE, Chrome and Konq the slideshow starts allover from the beginning.
It is very annoying because my slideshow stops at the last image and shows an imagemap with many links. No visitor will make it to the last link if he has to watch the slideshow each time from beginning on.
I read the thread from Ponder with answers from vwphillips and (of course) John (http://www.dynamicdrive.com/forums/showthread.php?69094-Stop-slideshow-from-starting-over) but hoped for an easier solution... like telling IE, Chrome and Konq to just behave like Firefox.
I am aware that starting the slideshow all over again might also be a feature, but in my case it's not wanted.
Does anybody have an idea why browsers behave so differently and what I can do to fix it? Do I have to use a pause function? Or can I do something to go dirctly to a certain (the last) image of the sildeshow?
Same issue with this completely different slideshow (http://reallysimpleworks.com/slideshow/) (second on page)
Thanks in advance for any support
(The best supporter gets... virtual beer?? No, real beer! The Octoberfest happens right in front of my door for the next 10 days :p Cheers )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title></title>
<style>
#slideshow {
position:relative;
}
#slideshow DIV {
position:absolute;
top:0;
left:0;
z-index:8;
opacity:0.6;
background-color: #006600;
}
#slideshow DIV.active {
z-index:10;
opacity:1.0;
}
#slideshow DIV.last-active {
z-index:9;
}
#slideshow DIV IMG {
height: 600px;
display: block;
border: 0;
}
#hover {
font-size: 18px;
margin: 20px;
background-color: yellow;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow DIV.active');
if ( $active.length == 0 ) $active = $('#slideshow DIV:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow DIV:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 800, function() {
$active.removeClass('active last-active');
});
}
jQuery(function($){
setInterval( "slideSwitch()", 2000 );
});
</script>
</head>
<body>
<map name="2" id="2">
<area shape="rect" coords="0,0,400,600" href="page-left.html" title="" target="_self" alt="" />
<area shape="rect" coords="400,0,800,600" href="page-right.html" title="" target="_self" alt="" />
</map>
<div id="slideshow">
<div class="active">
<div id="captionbar">Caption for image 1</div>
<img src="http://i284.photobucket.com/albums/ll12/lexxxijh/Beaches/Wallpaper-green-beach.jpg" alt="Slideshow Image 1" usemap="#2" />
</div>
<div>
<div id="captionbar">Caption for image 2</div>
<img src="http://upload.wikimedia.org/wikipedia/commons/b/ba/Venice_beach_panorama.jpg" alt="Slideshow Image 2" usemap="#2" />
</div>
<div>
<div id="captionbar">Caption for image 3</div>
<img src="http://latitudes.nu/wp-content/uploads/2011/09/Perhentian-Islands.jpg" alt="Slideshow Image 3" usemap="#2" />
</div>
<div>
<div id="captionbar">Caption for image 4</div>
<img src="http://www.my-miami-beach.de/miami-beach-fotos/gross/Wetter-und-Klima-in-Miami-Beach-Florida.jpg" alt="Slideshow Image 4" usemap="#2" />
</div>
</div>
</body>
</html>