/    Sign up×
Community /Pin to ProfileBookmark

Slide show troubles Please help my sad code :(

Very new to web design and having oh so much trouble with this darn slide show, it simply doesnt work. All I get on my screen is a black box. This slide show should have arrow buttons at the bottom to start and stop the show. I plan to have a large number of pics in rotation. Please help if you can or a new code would be helpful as well ?

<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] =” ../images/models/ pica (68).jpg” selected>pica
Pic[1] =” ../images/models/ picb (71).jpg”>picb
Pic[2] =” ../images/models/picc (17).JPG”>picc

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter=”blendTrans(duration=2)”;
document.images.SlideShow.style.filter=”blendTrans(duration=crossFadeDuration)”;
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p – 1)) j = 0;
t = setTimeout(‘runSlideShow()’, slideShowSpeed);
}
// End –>
</script>

<BODY onLoad=”runSlideShow()”>

<table border=”0″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td id=”VU” height=150 width=150>
<img src=”1.jpg” name=’SlideShow’ width=150 height=150>
</td>
</tr>
</table>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@balloonbuffoonJan 06.2006 — What is the stuff in red there for?
[CODE]Pic[0] =" ../images/models/ pica (68).jpg"[COLOR=Red] selected>pica[/COLOR]
Pic[1] =" ../images/models/ picb (71).jpg"[COLOR=Red]>picb[/COLOR]
Pic[2] =" ../images/models/picc (17).JPG"[COLOR=Red]>picc[/COLOR][/CODE]
Copy linkTweet thisAlerts:
@CrazyMerlinJan 06.2006 — I just made a slight adjustment, but it works fine for me.

[CODE]
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3.0;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] ="";
Pic[1] ="";
Pic[2] =""



// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

function runSlideShow() {

var objImage = document.getElementById('SlideShow');

if (document.all) {
objImage.style.filter="blendTrans(duration=2)";
objImage.style.filter="blendTrans(duration=crossFadeDuration)";
objImage.filters['blendTrans'].Apply();
}

objImage.src = preLoad[j].src;
objImage.alt = "Image: " + j;

if (document.all) {
objImage.filters['blendTrans'].Play();
}

j++;

if (j > (p - 1))
j = 0;

t = setTimeout('runSlideShow()', slideShowSpeed);

}
// End -->
</script>
</head>
<BODY onLoad="runSlideShow()">

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="VU" height=150 width=150>
<img id='SlideShow' width=150 height=150>
</td>
</tr>
</table>

</body>

</html>
[/CODE]


check where you are loading your images from and make sure you are going back to the correct folder
×

Success!

Help @salimab 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 6.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...