web blazonry web development scripts and tutorials Get best price on Samsung Galaxy S5, White 16GB (Verizon Wireless)
   PHP       Name Generators       Perl       CSS       Javascript       Java       MySql       How Tos       Resources   

Javascript Home


image scripts
  Image Load Order
  Mouse Overs
  SlideShow

JavaScript Resources
  Free JavaScript Books(new)
  Recommended Sites
  Bestselling Books

Bookmark and Share




JavaScript: Image Slide Show

The slide show displays a series of images with navigation for previous and next and an information caption about each image. It is based on the same principle as the Mouse Over script.  It adds more images into it, and works when the buttons are clicked. not just moused over.

A Pictorial History of mkaz.com

Previous


Next

 

JavaScript Source Code:

<script LANGUAGE="JavaScript">
<!--

var imgArray = new Array("start.gif", ...);
var descArray = new Array("Intro Page", ...);
var imgDir = "";
var pos = 0;
// initial images (pre-load)
if (document.images) {
for (i=0; i<imgArray.length; i++) {
eval("imgObj" + i + "= new Image()");
eval("imgObj" + i + ".src = '" + imgDir + imgArray[i] + "'");
}
}


function toPrevious() {

if (pos == 0) { pos = imgArray.length - 1; }
else { pos = pos - 1 };

eval("document.vvr.src = imgObj"+pos+".src");
document.theForm.desc.value = descArray[pos];
}

function toNext() {

if (pos == imgArray.length - 1) { pos = 0; }
else { pos = pos + 1; }

eval("document.vvr.src = imgObj"+pos+".src");
    document.theForm.desc.value = descArray[pos];
}


//-->
</script>

 

Newest Pages
Test Google Ads Ver. 2
Free Linux Admin Books
Free Linux Books for Programmers
Free Books for Linux on the Desktop
Free PHP Books
Free JavaScript Books
Free Java Books - Advanced
Free Java Books - Basic
Free Perl Books
Free Python Books
Quote of the Day (PHP)
Debugging Part 2
How to Test Google Ads
Most Popular Pages
Baby Name Generator
U.S. Name Generator
Wu Name Generator
Popup Windows (JavaScript)
Upload and Resize an Image (PHP)
How To Install Apache + PHP + MySQL
Intro to Web Databases (PHP, MySQL)

Least Popular Pages
iNews Applet (Java)
Java Resources
Site Monitor (Perl)
PHP Resources
 
 

  privacy policy     ||     © 1997-2016. astonishinc.com   All Rights Reserved.