Jump to content

Passing Height And Width


son
 Share

Recommended Posts

I have this working basic slideshow and wondered how you pass height and width. The current code assumes it is the same for each image, but I just noticed that this is acutally not the case...

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Slideshow</title><script type="text/javascript"><!--var image1=new Image()image1.src="hotel.jpg"var image2=new Image()image2.src="beach.jpg"var image3=new Image()image3.src="slides/main/bo_peep_to_arlington_reservoir.jpg"var image4=new Image()image4.src="onHorse.gif"var image5=new Image()image5.src="fish.jpg"//--></script></head><body><img src="hotel.jpg" name="slide" width="600" height="400" /><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")step++if (step == 5)step =1//call function "slideit()" every 2.5 secondssetTimeout("slideit()",2500)}slideit()//--></script></body>

Any ideas, helps, hints appreciated...Son

Link to comment
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
 Share

×
×
  • Create New...