Jump to content

Recommended Posts

I've some slideShow code, but I want to create a menu for it. How should I do that...

 

<head>
<script language="JavaScript1.1">
<!--



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>
</head


<body>
<a href="javascript:gotoshow()"><img src="image1.jpg" name="slide" border=0 width=677 height=300></a>
<script>
<!--

//configure the paths of the images, plus corresponding target links
slideshowimages("image1.jpg","image2.jpg","image3.jpg","image4.jpg","image5.jpg")
slideshowlinks("#","#","#","#","#")

//configure the speed of the slideshow, in miliseconds
var slideshowspeed=15000

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>
</body>

Link to comment
https://forums.phpfreaks.com/topic/252023-creating-slideshow-menu/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.