/    Sign up×
Community /Pin to ProfileBookmark

help with slideshow

I’m trying to put a slideshow on my website. I can get two on a pg. but when I try to put the third one, it messing up showing a box with X or nothing at all. I’ve tried all three scripts as well as a mixture of the three…I’ll try to c&p the scripts here….

[code]<script type=”text/javascript”>

// Flexible Image Slideshow- By JavaScriptKit.com ([url]http://www.javascriptkit.com[/url])
// For this and over 400+ free scripts, visit JavaScript Kit- [url]http://www.javascriptkit.com/[/url]
// This notice must stay intact for use

var ultimateshow=new Array()

//ultimateshow[x]=[“path to image”, “OPTIONAL link for image”, “OPTIONAL link target”]

ultimateshow[0]=[‘jassblkmale2wks7.jpg’]
ultimateshow[1]=[‘jassblkmale2wks11.jpg’]
ultimateshow[2]=[‘jassblkmale2wks12.jpg’]
ultimateshow[3]=[‘jassblkmale2wks16.jpg’]
ultimateshow[4]=[‘jassiblkmale4.5wks.jpg’]
ultimateshow[5]=[‘jassiblkmale4.5wks1.jpg’]
ultimateshow[6]=[‘jassiblkmale4.5wks2.jpg’]
ultimateshow[7]=[‘jassiblkmale4.5wks5.jpg’]

//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth=”300px” //set to width of LARGEST image in your slideshow
var slideheight=”261px” //set to height of LARGEST iamge in your slideshow
var slidecycles=”3″ //number of cycles before slideshow stops (ie: “2” or “continous”)
var randomorder=”no” //randomize the order in which images are displayed? “yes” or “no”
var preloadimages=”yes” //preload images? “yes” or “no”
var slidebgcolor=’white’

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=3000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById
var curcycle=0

if (preloadimages==”yes”){
for (i=0;i<ultimateshow.length;i++){
var cacheimage=new Image()
cacheimage.src=ultimateshow[i][0]
}
}

var currentslide=0

function randomize(targetarray){
ultimateshowCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!=”_selected!”){
ultimateshowCopy[z]=targetarray[the_one]
targetarray[the_one]=”_selected!”
z++
}
}
}

if (randomorder==”yes”)
randomize(ultimateshow)
else
ultimateshowCopy=ultimateshow

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer='<center>’
if (ultimateshowCopy[currentslide][1]!=””)
ultcontainer+='<a href=”‘+ultimateshowCopy[currentslide][1]+'” target=”‘+ultimateshowCopy[currentslide][2]+'”>’
ultcontainer+='<img src=”‘+ultimateshowCopy[currentslide][0]+'” border=”0″>’
if (ultimateshowCopy[currentslide][1]!=””)
ultcontainer+='</a>’
ultcontainer+='</center>’
if (ie||dom)
crossrotateobj.innerHTML=ultcontainer
if (currentslide==ultimateshow.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout(“rotateimages()”,slidedelay)
}

if (ie||dom)
document.write(‘<div id=”slidedom” style=”width:’+slidewidth+’;height:’+slideheight+’; background-color:’+slidebgcolor+'”></div>’)

function start_slider(){
crossrotateobj=dom? document.getElementById(“slidedom”) : document.all.slidedom
rotateimages()
}

if (ie||dom)
window.onload=start_slider

</script>
——————————————————–
<script language=”JavaScript1.1″>
<!–
/*
JavaScript Image slideshow:
By JavaScript Kit ([url]www.javascriptkit.com[/url])
Over 200+ free JavaScript here!
*/
var slideimages=new Array()
var slidelinks=new Array()
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}
}
function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}
function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}
//–>
</script>
<a href=”javascript:gotoshow()”><img src=”food1.jpg” name=”slide” border=0 width=250 height=250></a>
<script>
<!–
//configure the paths of the images, plus corresponding target links
slideshowimages(“jassilgbrnmale2wks2.jpg”,”jassilgbrnmale2wks3.jpg”,”jassilgbrnmale2wks5.jpg”,”jassilglbrnmale2wks6.jpg”,”jassilgbrnmale4.5wks.jpg”,”jassilgbrnmale4.5wks6.jpg”,”jassilgbrnmale4.5wks7.jpg”,”jassilgbrnmale4.5wks8.jpg”)
slideshowlinks(“http://food.epicurious.com/run/recipe/view?id=13285″,”http://food.epicurious.com/run/recipe/view?id=10092″,”http://food.epicurious.com/run/recipe/view?id=100975″,”http://food.epicurious.com/run/recipe/view?id=2876″,”http://food.epicurious.com/run/recipe/view?id=20010”)
//configure the speed of the slideshow, in miliseconds
var slideshowspeed=2200
var whichlink=0
var whichimage=0
function slideit(){
if (!document.images)
return
document.images.slide.src=slideimages[whichimage].src
whichlink=whichimage
if (whichimage<slideimages.length-1)
whichimage++
else
whichimage=0
setTimeout(“slideit()”,slideshowspeed)
}
slideit()
//–>
</script>
——————————
</script>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Original: CodeLifter.com ([email protected]) –>
<!– Web Site: [url]http://www.codelifter.com[/url] –>

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

<!– 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] = ‘1.Architecture/arch1.jpg’
Pic[1] = ‘1.Architecture/arch2.jpg’
Pic[2] = ‘1.Architecture/arch3.jpg’
Pic[3] = ‘1.Architecture/arch4.jpg’

// 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 –>[/code]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsApr 26.2006 — as many as you like with

[URL]http://www.vicsjavascripts.org.uk/MultipleSlideShow/MultipleSlideShow.htm[/URL]
Copy linkTweet thisAlerts:
@VladdyApr 26.2006 — 
  • - more types of content

  • - accessible content

  • - nested slideshows

    www.klproductions.com/klslideshow.html
  • Copy linkTweet thisAlerts:
    @hoffmanstoysauthorApr 26.2006 — Thanks for the info on the URLs. I appreciate the help. I'll try to figure out what I'm to change in the script to input my photos. Have a good one!!!
    ×

    Success!

    Help @hoffmanstoys 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.5,
    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: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

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

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