This script creates a slideshow, using functions to navigate forward and backward through an array of images. The images depicted are graphics I developed for a number of different web sites in the mid 1990's. No laughing!

Source Code:

<!--
MODULE NAME: /javascript/week4/slideshow.cfm
PURPOSE: Assignment 2, week 4.
REFERRING MODULE(S): whiteboard_iframe.cfm
DESTINATION MODULE(S):
QUERYSTRING METHODS SUPPORTED:
AUTHOR: Grant Szabo (grant@quagmire.com) Sterling Creek Software
CREATED: 12/17/02
LAST MODIFIED: 12/17/02
-->

<html>
<head>
<title></title>

<script language="JavaScript">

myPix = new Array("/images/portfolio/baxter_fade.gif", "/images/portfolio/baxter_guzlog.gif", "/images/portfolio/baxter_logo.gif", "/images/portfolio/baxter_logo_sm.gif", "/images/portfolio/baxter_road.gif", "/images/portfolio/g_std1.gif", "/images/portfolio/gwvrp_logo.gif", "/images/portfolio/ides1.gif", "/images/portfolio/vamap.gif");
thisPic = 0;
imgCt = myPix.length - 1;

function fcnPrevious(){
	if(document.images && thisPic > 0) {
		thisPic--
		document.myPicture.src=myPix[thisPic];
		}
}

function fcnNext() {
	if(document.images && thisPic < imgCt) {
		thisPic++
		document.myPicture.src=myPix[thisPic];
		}
}						
</script>							

</head>

<body>

<center>
<p class="font1Bold">
<a href="http://www.quagmire.com:80/javascript/week4/javascript:fcnPrevious();">&lt;&lt; View Previous</a> 
&nbsp;&nbsp;
<a href="http://www.quagmire.com:80/javascript/week4/javascript:fcnNext();">View Next &gt;&gt;</a> 
</p>
<img src="http://www.quagmire.com:80/images/portfolio/baxter_fade.gif" name="myPicture">
</center>	

</body>
</html>