|
|
|
|
![]() ![]() |
Jul 8 2005, 07:33 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: Members Posts: 31 Joined: 8-July 05 Member No.: 6,913 |
This is just a small script that lets you display a set of pictures in a slideshow-like manner. This script lets you show the thumbnailed versions of the pictures, and then when the user clicks on a pic, the user is taken to the actual picture.
NOTE: You can add more pictures to the array by copying the format that is being used in it: CODE <html> <head> <script language='Javascript' type='text/css'> <!-- slideshow = new Array( "images/image1.bmp", "images/image2.bmp", "images/image3.bmp", "images/image4.bmp" ) slideNumber = slideshow.length slideCurrent = 0 function loadSlides() { document.slide.src = slideshow[slideCurrent] } function slideNext() { if(slideCurrent < slideNumber) { slideCurrent ++ document.slide.src = slideshow[slideCurrent] } else { slideCurrent = 0 document.slide.src = slideshow[slideCurrent] } } function slidePrevious() { if(slideCurrent > 0) { slideCurrent -- document.slide.src = slideshow[slideCurrent] } else { slideCurrent = slideNumber - 1 } } function playSlides() { if(slideCurrent < slideNumber) { slideCurrent ++ document.slide.src = slideshow[slideCurrent] setTimeout("playSlides()", 2500) } else { slideCurrent = 0 document.slide.src = slideshow[slideCurrent] setTimeout("playSlides()", 2500) } } function openPicture() { window.open(slideshow[slideCurrent], "slideWindow") } //--> </script> </head> <body onLoad = loadSlides()> <a href='javascript: openPicture()'><img name='slide' width=96 height=96></a><br> <center> <a href='javascript: slidePrevious()'><img src='prev.bmp'></a> <a href='javascript: slideNext()'><img src='prev.bmp'></a> <a href='javascript: playSlides()'><img src='prev.bmp'></a> </center> </body> </html> If you need more information, just ask and I'll reply. Good luck with the script and enjoy! If I receive my hosting, I will upload the script to the server and show you what it's supposed to do. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 09:14 PM |