|
Web Design Tips
FrontPage Universe Tips
Photo
Album
If you have a few images that you would like to display on a webpage
this little script will help. With this you can flip through several
images, one at a time. To modify this script for your needs, change
the image URLs in the script to the exact location of your images on
your web server. If you are using more than 3 images, you will need
to change this line if (document.images && thisImage < 2) by
changing the number 2 to the number of images you are using less 1.
<script language="JavaScript">
<!--
var viewPix = new Array("http://images.frontpageuniverse.com/frontpageuniverse/
images/c/frontpageuniverse/aff468/20040113-bn468x60d-1.gif","http://images.frontpageuniverse.com/frontpageuniverse/
images/c/frontpageuniverse/aff468/20040113-bn468x60d-2.gif","http://images.frontpageuniverse.com/frontpageuniverse/
images/c/frontpageuniverse/aff468/20040113-bn468x60d-3.gif")
var thisImage = 0
function doPast() {
if (document.images && thisImage > 0) {
thisImage--
document.myShow.src=viewPix[thisImage]
}
}
function doAfter() {
if (document.images && thisImage < 2) {
thisImage++
document.myShow.src=viewPix[thisImage]
}
}
// -->
</script>
<div align="center"><img name="myShow" src="http://images.frontpageuniverse.com/frontpageuniverse/
images/c/frontpageuniverse/aff468/20040113-bn468x60d-1.gif"
width="468" height="60"><br><a href="javascript:doPast()">Previous</a>
<a href="javascript:doAfter()">Next</a></div>
|