web blazonry web development scripts and tutorials
 
Web blazonry.com
   Home       PHP       Name Generators       Perl       CSS       Javascript       Java       devTips       Resources   

Javascript Home


image scripts
  Image Load Order
  Mouse Overs
  SlideShow

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





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
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
Source Code for Test Google Ads (PHP)
Most Popular Pages
U.S. Name Generator
Wu Name Generator
Baby Name Generator
Upload and Resize an Image (PHP)
Popup Windows (JavaScript)
How To Install Apache + PHP + MySQL
Simple Web Calendar (PHP)

Least Popular Pages
Image Load-Order (Javascript)
dHTML: Scrolling Layers
iNews Aplet (Java)
ProcLog Search Your Logs (Perl)
 
 

  © 1997-2008. astonishinc.com   All Rights Reserved.