I'm very new to java- as a matter of fact, I'd say that I know nothing about it....except for how to cut and paste free java script to my pages.
I have the need for three different slide shows on my index page. Two of them are working- and the third one won't show up at all. I tried to do it as an "includes" page- nothing worked, only an error message.
I finally have all three scripts showing the pictures but one of them was not designed to have clickable links- and I don't know how to rewrite it.
So my question is: Is there a limit to how many scripts you can have on a page? What causes them to conflict? Is there a way to do them as includes?
any advice would be appreciated. I want to learn but don't know where to start.
Here's the script that I'd like to be able to make as links:
<td> <script language="javascript">
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/
var delay=5000 //set delay in miliseconds
var curindex=0
var randomimages=new Array()
randomimages[0]="/banners/urbanabannersm.jpg"
randomimages[1]="/banners/diamondwbanner2.jpg"
randomimages[2]="/banners/classicbanner.jpg"
randomimages[3]="/banners/oxygenbanner.jpg"
var preload=new Array()
for (n=0;n<randomimages.length;n++)
{
preload[n]=new Image()
preload[n].src=randomimages[n]
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(ra ndomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex
document.images.defaultimage.src=randomimages[curindex]
}
setInterval("rotateimage()",delay)
</script>