Welcome Guest ( Log In | Register )




                Web Hosting

 
Reply to this topicNew Topic
Slideshow Of Pictures, Simple script
Chris Neutral
post Jul 8 2005, 07:33 PM
Post #1


Member [ Level 1 ]
Group Icon

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='java script: openPicture()'><img name='slide' width=96 height=96></a><br>
<center>
<a href='java script: slidePrevious()'><img src='prev.bmp'></a>
<a href='java script: slideNext()'><img src='prev.bmp'></a>
<a href='java script: 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.
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts 15 soleimanian 1,343 30th September 2008 - 10:01 AM
Last post by: magiccode9
No New Posts   2 WeaponX 2,200 10th July 2008 - 04:12 PM
Last post by: jaus
No new   20 bad-and-ugly 2,533 11th December 2007 - 09:46 AM
Last post by: Dave Herbst
No New Posts   10 l337 Nurse Pedestrian 1,974 22nd September 2007 - 01:05 PM
Last post by: mshmsh2010
No New Posts 14 miCRoSCoPiC^eaRthLinG 3,118 16th December 2006 - 01:14 PM
Last post by: richie
No new   21 Nick Erwin 2,359 10th October 2006 - 12:52 PM
Last post by: ginginca
No New Posts   0 wutske 1,741 26th May 2006 - 12:05 PM
Last post by: wutske
No New Posts   12 dhanesh 2,132 10th March 2006 - 05:49 AM
Last post by: kuyakurt
No New Posts   3 ebbinger_413 833 9th February 2006 - 02:36 PM
Last post by: ebbinger_413
No New Posts   6 warbird 1,128 16th January 2006 - 06:10 PM
Last post by: jorbanks
No New Posts   10 RomfordReject1 1,701 28th December 2005 - 06:01 PM
Last post by: chocolatxbliss
No New Posts   10 qwijibow 2,297 29th November 2005 - 12:41 AM
Last post by: techocian
No New Posts   2 soleimanian 5,806 27th August 2005 - 12:01 AM
Last post by: kiddo
No New Posts   2 sxyloverboy 755 26th August 2005 - 08:07 PM
Last post by: comateen
No New Posts   1 prosorcerer 1,438 28th July 2005 - 11:46 AM
Last post by: Giniu