Slide show
-
I’m trying to get my website to show images one after the other using java script I got from www.javascriptkit.com/howto/show2.shtml and have followed there example as closely as I can but with no luck.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Acrele - Home</title>
<meta name="keywords" content="" />
<meta name="description" content="" /><script type="text/javascript">
var image1=new Image() image1.src="16.jpg" var image2=new Image() image2.src="employee-training.jpg" var image3=new Image() image3.src="Real\_Estate\_Investment\_Education.jpg" var image4=new Image() image4.src="Unti2tled.jpg" var image5=new Image() image5.src="Untitled.jpg" var image6=new Image() image6.src="zclassroom.jpg"
</script>
</head>
2. Added the html code were I want the image to show:

3. Edited there javascript accordingly to the number of images I’m using:
 <script> var step=1; //if browser does not support the image object, exit. var img = document.getElementById('slide'); img.src = "image" + step + ".src"; console.log(img.src); if (step < 6) step++; else step = 1; //call function "slideit()" every 2.5 seconds setTimeout(slideit, 3500); </script>
This isn’t working, it onl
-
I’m trying to get my website to show images one after the other using java script I got from www.javascriptkit.com/howto/show2.shtml and have followed there example as closely as I can but with no luck.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Acrele - Home</title>
<meta name="keywords" content="" />
<meta name="description" content="" /><script type="text/javascript">
var image1=new Image() image1.src="16.jpg" var image2=new Image() image2.src="employee-training.jpg" var image3=new Image() image3.src="Real\_Estate\_Investment\_Education.jpg" var image4=new Image() image4.src="Unti2tled.jpg" var image5=new Image() image5.src="Untitled.jpg" var image6=new Image() image6.src="zclassroom.jpg"
</script>
</head>
2. Added the html code were I want the image to show:

3. Edited there javascript accordingly to the number of images I’m using:
 <script> var step=1; //if browser does not support the image object, exit. var img = document.getElementById('slide'); img.src = "image" + step + ".src"; console.log(img.src); if (step < 6) step++; else step = 1; //call function "slideit()" every 2.5 seconds setTimeout(slideit, 3500); </script>
This isn’t working, it onl
You have removed the code from inside the "slideit" function, so now there is no way for it to repeat and the
setTimeout(slideit, 3500)
is trying to call a function that doesn't exist. -
I’m trying to get my website to show images one after the other using java script I got from www.javascriptkit.com/howto/show2.shtml and have followed there example as closely as I can but with no luck.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Acrele - Home</title>
<meta name="keywords" content="" />
<meta name="description" content="" /><script type="text/javascript">
var image1=new Image() image1.src="16.jpg" var image2=new Image() image2.src="employee-training.jpg" var image3=new Image() image3.src="Real\_Estate\_Investment\_Education.jpg" var image4=new Image() image4.src="Unti2tled.jpg" var image5=new Image() image5.src="Untitled.jpg" var image6=new Image() image6.src="zclassroom.jpg"
</script>
</head>
2. Added the html code were I want the image to show:

3. Edited there javascript accordingly to the number of images I’m using:
 <script> var step=1; //if browser does not support the image object, exit. var img = document.getElementById('slide'); img.src = "image" + step + ".src"; console.log(img.src); if (step < 6) step++; else step = 1; //call function "slideit()" every 2.5 seconds setTimeout(slideit, 3500); </script>
This isn’t working, it onl
There are a lot of bad slideshow scripts out there, I rewrote one that was a CMS plugin for word press which had many errors in it, and made no sense to me. It might be too advanced for you, and requires JQuery, but is simplistic in design. [Display Advertising Filmstrip^]
-
I’m trying to get my website to show images one after the other using java script I got from www.javascriptkit.com/howto/show2.shtml and have followed there example as closely as I can but with no luck.
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Acrele - Home</title>
<meta name="keywords" content="" />
<meta name="description" content="" /><script type="text/javascript">
var image1=new Image() image1.src="16.jpg" var image2=new Image() image2.src="employee-training.jpg" var image3=new Image() image3.src="Real\_Estate\_Investment\_Education.jpg" var image4=new Image() image4.src="Unti2tled.jpg" var image5=new Image() image5.src="Untitled.jpg" var image6=new Image() image6.src="zclassroom.jpg"
</script>
</head>
2. Added the html code were I want the image to show:

3. Edited there javascript accordingly to the number of images I’m using:
 <script> var step=1; //if browser does not support the image object, exit. var img = document.getElementById('slide'); img.src = "image" + step + ".src"; console.log(img.src); if (step < 6) step++; else step = 1; //call function "slideit()" every 2.5 seconds setTimeout(slideit, 3500); </script>
This isn’t working, it onl
you must use setinterval...