Sign in to follow this  
Followers 0
Francis Coquelin

javascript help

2 posts in this topic

<head><script type="text/javascript"><!--var image1=new Image() // load all images as variablesimg src="Images/desktop1.JPG" // first imagevar image2=new Image()img src="Images/laptop1.jpg" // second imagevar image3=new Image()img src="Images/router1.jpg" // third imagevar image4=new Image()img src="Images/ram1.jpg"  // fourth imagevar image5=new Image()img src="Images/speaker1.jpg" // fifth  image</head>//--></script><body><img src="desktop1.JPG" name="slide" width="100" height="56" /> <!-- insert first image --><script><!--//variable that will increment through the imagesvar step=1function slideit(){//if browser does not support the image object, exit.if (!document.images)returndocument.images.slide.src=eval("image"+step+".src") // run the slideshowif (step<3) // count which image to show nextstep++elsestep=1//call function "slideit()" every 2.5 secondssetTimeout("slideit()",2500) // wait 2.5 seconds}slideit() // change to the next image//--></script></body>

only the first image is visiblewhat am i doing wrong?

0

Share this post


Link to post
Share on other sites

Change the .jpg on each of the remaining images to higher case (.JPG)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0