bancuri, glume, imagini, video, fun, bancuri online, bancuri tari, imagini haioase, videoclipuri haioase, distractie online Pe HaiSaRadem.ro vei gasi bancuri, glume, imagini, video, fun, bancuri online, bancuri tari, imagini haioase, videoclipuri haioase, distractie online. Nu ne crede pe cuvant, intra pe HaiSaRadem.ro ca sa te convingi.
enter page web design web resource entertainment personals  

Tricks: How to...
Image effects:
Preload images
Preload images 2
Swap images
Swap images 2
View larger image
Image transparency
Image slideshow
Special effects:
Border
Border 2
Watermark
Scroller
Scroller 2
Link hover color
Custom cursor
Snowing
Auto window resizer
Link tips
Popup
Buttons & menus:
Back button
Java buttons
Flat buttons
Slide menu
Drop down menu
Alphabet menu
Mouse effects:
Elastic mouse
Mouse snake
Mouse stars
Mouse orbit
Mouse eyes
Text generators:
Infobox
Quote generator
Fading messages
Text fader
Text glow
Credits

home > real world > web resource > web source codes >

Image Slideshow

STEP 1/2: Put this code in the <HEAD> of your document:

<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var rotate_delay = 2000; // delay in milliseconds (1000 = 1 sec)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
}
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
}
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
}
}
// End -->
</script>
</HEAD>

STEP 2/2: Put this code in the <BODY> of your document:

<center>
<form name=slideform>
<table cellspacing=1 cellpadding=4 bgcolor="#229922">
<tr>
   <td align=center bgcolor="black">
      <b>Image Slideshow</b>
   </td>
</tr>
<tr>
   <td align=center bgcolor="black" width=200 height=150>
      <img src="cart.gif" name="show">
   </td>
</tr>
<tr>
   <td align=center bgcolor="#226622">
      <select name="slide" onChange="change();">
         <option value="cart.gif" selected>Cart
         <option value="aat.gif">AAT
         <option value="boat.gif">Boat
         <option value="enterprise.gif">Enterprise
         <option value="ewing.gif">E-Wing
         <option value="f18.gif">F-18
         <option value="klingon.gif">Klingon
         <option value="landingcraft.gif">Landing Craft
         <option value="hoverracer.gif">Hover Racer
         <option value="sith.gif">Sith
      </select>
   </td>
</tr>
<tr>
   <td align=center bgcolor="#226622">
      <input type=button onClick="first();" value="|<<" title="Beginning">
      <input type=button onClick="previous();" value="<<" title="Previous">
      <input type=button name="slidebutton" onClick="ap(this.value);" value="Start" title="AutoPlay">
      <input type=button onClick="next();" value=">>" title="Next">
      <input type=button onClick="last();" value=">>|" title="End">
   </td>
</tr>
</table>
</form>
</center>
© copyright 2004 - DigitalElf.ro - marian_dumitriu@yahoo.com