DHTML script
 

SimplytheBest
Scripts

ASP scripts
PERL scripts
PHP scripts
JavaScripts & Ajax
Snippets
Online scripts

Ajax, DHTML
& JavaScripts

Animation
Background
Bookmarks
Buttons
Calculators
Cookies
Data handling
E-mail
Enhancements
Forms
Image rotation
Menus
Messages
Miscellaneous
Music
Password protection
Redirection
Scrollers
Tables
Time & date
Windows

Publishers
Add script
Account login
Publisher list



 

Home > Scripts > DHTML scripts & JavaScripts > Image rotation > DHTML image slideshow script

 

DHTML image slideshow script

AUTHORS: David G. Miles, Thomas Brattli
TYPE: Freeware
BROWSERS: IE 4+, IE 5+, IE 6+, NS 4+, NS 6+

A cross browser DHTML image slideshow script.


EXAMPLE

 
slideshow
 
Previous Next


1)
Insert this script in the <HEAD> section of the page.

then copy (CTRL-C) & paste (CTRL-V)

 

2) Insert the following code in the <BODY> section, where you want the slideshow to appear in the page.

then copy (CTRL-C) & paste (CTRL-V)

 

3) Define the path, the size and the number of images to appear in the slideshow in this section of the script:

if(document.images) { 
currentslide=1; 
maxslides=6
// number of images in the slideshow
slide = new Array(maxslides+1); 
for(var n=1;n<=maxslides;n++) { 
slide[n]=new Image(500,245);
// width, height
slide[n].src='images/'+n+'.gif';
// change to .jpg if applicable

4) Define the first image to appear in the slideshow and its size in this section of the HTML code:

<td height=245 colspan=2><img name='slide' width=500 height=245 border=0 hspace=0 vspace=0 alt='slideshow' src='images/1.gif'></td>

Name the images for the slideshow like this: 1.gif, 2.gif, etc. (or 1.jpg, 2.jpg, etc. if applicable).


For more information and tutorial on this script, you can also visit David Miles' web site.

Images used in this example are taken from PlanMagic Business.


[BACK] [TOP]

 


Copyright © 1997-2009 SimplytheBest Inc. Terms of Use and Legal Disclaimer.
All copyrights are acknowledged. All rights reserved.