/    Sign up×
Community /Pin to ProfileBookmark

Slideshow – won’t run in Opera or Firefox (Mac). Any suggestions??

Hi,

I’ve been away from the forums for a while as I’m not doing too much web design right now. I’m building a site for my wife and I incorporated a slideshow script from a few years back. The problem is, it most likely pre-dates Firefox and Opera 9.23 (Mac). The slideshow is set to automatically run onLoad. It works beautifully in IE (Windows) and Safari. It worked fine in Firefox until I posted the file to the server – it doesn’t seem to want to run from the Linux-based remote server.

Here’s a link to the page »» [URL=”http://www.nancystalbow.com/coming_soon_new_script.html”]http://www.nancystalbow.com/coming_soon_new_script.html[/URL] It’s the holding page.

Here’s the script »»

Code:

[CODE]
<script language=”JavaScript” type=”text/javascript”>
<!– Original: CodeLifter.com ([email protected]) –>
<!– Web Site: http://www.codelifter.com –>

<!– This script and many more are available free online at –>
<!– The JavaScript Source!! http://javascript.internet.com –>

<!– This is a MODIFIED VERSION (with due respect to the author) –>
<!– Made it Object-Oriented to run multiple slideshows –>

<!– Begin

function SlideShow(imgName,speed,duration){
var p; //length of Pic array
var j = 0;
var slide = imgName;
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = speed;
// Duration of crossfade (seconds)
var crossFadeDuration = duration;
var Pic = new Array();
this.timer = null;
this.setPics = function(){
var preLoad = new Array();
//set pics and preload
for (var i=0;i<arguments.length;i++){
Pic[i] = arguments[i];
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
p = Pic.length;
}
this.runSlideShow = function(varName){
var t;
if (document.all) {
document.images[slide].style.filter=”blendTrans(duration=3)”;
document.images[slide].style.filter=”blendTrans(duration=crossFadeDuration)”;
document.images[slide].filters.blendTrans.Apply();
}
document.images[slide].src = Pic[j];
if (document.all) {
document.images[slide].filters.blendTrans.Play();
}
j = j + 1;
if (j > (p – 1)) j = 0;
this.timer = setTimeout(varName+”.runSlideShow(‘”+varName+”‘)”, slideShowSpeed);

}
this.stopSlideShow = function(){
if (this.timer) clearTimeout(this.timer);
}
}
//end script

//sample usage
var slide1 = new SlideShow(‘SlideShow1’,2800,90);
slide1.setPics(“slides/balloons.jpg”,”slides/bvm.jpg”,”slides/cake&flowers.jpg”,”slides/caribbean_market.jpg”,”slides/chicken.jpg”,”slides/christmas_squares.jpg”,”slides/partridge_pear_tree.jpg”,”slides/hannukah.jpg”,”slides/crow.jpg”,”slides/mexican_angels.jpg”,”slides/feliz.jpg”,”slides/latkes.jpg”,”slides/matruschka.jpg”,”slides/ornaments.jpg”,”slides/christmas_mice.jpg”,”slides/nativity.jpg”,”slides/pud.jpg”,”slides/pinatas.jpg”,”slides/pullover.jpg”,”slides/thanksgiving.jpg”,”slides/season.jpg”,”slides/red_ornaments.jpg”,”slides/trees.jpg”,”slides/we_wish_u.jpg”,”slides/still_life.jpg”,”slides/sleigh_bells.jpg”,”slides/angel.jpg”);

//if you want to start slideshows onload
/*window.onload = function(){
slide1.runSlideShow(‘slide1’);
}*/

// End –>
</script>
[/CODE]

[INDENT]</head>
<body onload=”slide1.runSlideShow(‘slide1’)” class=”c3″>
<div id=”pic1″><img name=”SlideShow1″ src=”slides/balloons.jpg” width=”136″ height=”110″ alt=”slideshow loading” id=”SlideShow1″></div>[/INDENT]

All help and any comments or suggestions greatly appreciated. My strengths are in layout and CSS – I’m strictly copy/paste plus a little fudging here and there when it comes to javaScript!! ?

Thanks,
robsta

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@LeeUJul 17.2008 — The slide show works fine for me, using Firefox 2.
Copy linkTweet thisAlerts:
@robsta117authorJul 17.2008 — The slide show works fine for me, using Firefox 2.[/QUOTE]

? Thanks for the update - maybe the problem's at my end.

Thanks,

Robert
×

Success!

Help @robsta117 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...