JavaScript Picture Slider

Hello,

I was coding this little Picture Slider in JavaScript for a colleague and thought: Why not just share it with everybody else?

So here it is people… It is not advanced, it is not high-tech… but it is simple!

  1. <html>
  2.  
  3. <head>
  4.     <title>Picture Slider</title>
  5.  
  6.     <script type="text/javascript">
  7.     // Setup
  8.     var imagePath = "images/"; // Path to image-folder
  9.     var images = new Array("image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg"); // filenames of the images
  10.     var slideInterval = 1.5; // amount of seconds before sliding to the next image.
  11.  
  12.    // Variabels
  13.     var curImage = 0;
  14.  
  15.     // Fucntions   
  16.     function startSlide() {
  17.         setTimeout("nextSlide()", slideInterval * 1000);
  18.     }
  19.  
  20.     function nextSlide() {
  21.         var viewer = document.getElementById("imageViewer");
  22.         curImage = curImage + 1;
  23.  
  24.         if (images[curImage] == null)
  25.             curImage = 0;
  26.  
  27.         viewer.src = imagePath + images[curImage];
  28.  
  29.         setTimeout("nextSlide()", slideInterval * 1000);
  30.     }
  31.  
  32.     // Start the slider
  33.     startSlide();
  34.     </script>
  35. </head>
  36.  
  37. <body>
  38.  
  39.     <h1>Picture Slider</h1>
  40.     <br />
  41.     <img id="imageViewer" src="images/image1.jpg">
  42.  
  43. </body>
  44.  
  45. </html>

Just change the variables under the “setup” in the start of the JavaScript-code and change the src-parameter on the img-tag of the picture to show the first picture. Then the script will work.

Have fun !!

/KEF

SMS and contact software for Windows Mobile

Hello,

I have for a while been using Erricasoft Mobile Express to send and recieve SMS and editing my contacts on my Windows Mobile Smartphone through my computer. Normally the software is under a license, but today I found out that a new version of the software is free.

Efficasoft Mobile Express

If you are running Windows Vista you have to install the newest version af Windows Mobile Device Center. You can download it here.

If you instead are running Windows XP, Windows 2000 or such you have to have the newest version af ActiveSync installed. You can download it here.

The software from Efficasoft is great. It is easy to install (Mobile Express only requires a little installation on your Smartphone) and it is very easy to use.

You can read much more about Efficasoft Mobile Express here, or you can download it directly from here (link working at11th February 2009).

Try it, be happy about it, and thank me for finding it for you :-)