I have a slideshow, it uses
sigsImages=new Array()");
sigsImages[0]="sigs/finished1.jpg"
sigsImages[1]="sigs/foghorn.jpg"
sigsImages[2]="sigs/motto.jpg"
sigsImages[3]="sigs/sig.jpg"
sigsImages[4]="sigs/SWAT.jpg"
sigsImages[5]="sigs/title.gif"
sigscounter=sigsImages.length-1"
....
<td align="center"><img id="sigsviewer" src="sigs/sig.jpg"></td>
....
Instead of manually puting a file for the starting pic, how do I set
it to a random pick?
I tried;
<td align="center"><img id="sigsviewer" src=sigsImages[X]></td>
but that don't work.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Bow's and foggy's stored signatures</title>
<SCRIPT src="sigsheader.js"></SCRIPT>
</head>
<body
background="http://home.insightbb.com/clipart/backgrounds/bkgnd019.gif"
bgcolor="#ffffff" link="#0000ff" text="#000000" vlink="#ff0000">
<h1 align="center">Bow's and foggy's stored grahics</h1>
<h2 align="center" style="color: rgb(255, 0, 0);" color="red">Team
Special Forces</h2>
<SCRIPT src="sigsbody.js"></SCRIPT>
<table align="center">
<tr>
<td>
<a href="/cgi-bin/GBEntry?owner=emailid">
<img src="/global-images/guestbook/sign_gb.jpg" border="0"></a>
</td>
<td>
<P>Then email it to us at <a
href="mailto:Bo*******@insightbb.com">Bo*******@in sightbb.com</a></p>
</td>
<td>
<a href="/cgi-bin/GBView?owner=emailid">
<img src="/global-images/guestbook/view_gb.jpg" border="0"></a>
</td>
</tr>
</table>
</body>
</html>
document.writeln("<script type=\"text/javascript\">");
document.writeln("sigsImages=new Array()");
document.writeln("sigsImages[0]=\"sigs/finished1.jpg\"");
document.writeln("sigsImages[1]=\"sigs/foghorn.jpg\"");
document.writeln("sigsImages[2]=\"sigs/motto.jpg\"");
document.writeln("sigsImages[3]=\"sigs/sig.jpg\"");
document.writeln("sigsImages[4]=\"sigs/SWAT.jpg\"");
document.writeln("sigsImages[5]=\"sigs/title.gif\"");
document.writeln("sigscounter=sigsImages.length-1");
document.writeln("sigsi=0");
document.writeln("function sigsfirst()");
document.writeln("{");
document.writeln("document.getElementById(\'sigsvi ewer\').src=sigsImages[0]");
document.writeln("sigsi=0");
document.writeln("}");
document.writeln("function sigsprevious()");
document.writeln("{");
document.writeln("if (sigsi>0)");
document.writeln("{");
document.writeln("sigsi--");
document.writeln("document.getElementById(\'sigsvi ewer\').src=sigsImages[sigsi]");
document.writeln("}");
document.writeln("}");
document.writeln("function sigsnext()");
document.writeln("{");
document.writeln("if (sigsi<sigscounter)");
document.writeln("{");
document.writeln("sigsi++");
document.writeln("document.getElementById(\'sigsvi ewer\').src=sigsImages[sigsi]");
document.writeln("}");
document.writeln("}");
document.writeln("function sigslast()");
document.writeln("{");
document.writeln("document.getElementById(\'sigsvi ewer\').src=sigsImages[sigscounter]");
document.writeln("}");
document.writeln("<\/script>");
document.writeln("<center>");
document.writeln("<h1>sigs<\/h1>");
document.writeln("<form>");
document.writeln("<input value=\"First\" onclick=\"sigsfirst()\"
type=\"button\">");
document.writeln("<input value=\"Previous\" onclick=\"sigsprevious()\"
type=\"button\">");
document.writeln("<input value=\"Next\" onclick=\"sigsnext()\"
type=\"button\">");
document.writeln("<input value=\"Last\" onclick=\"sigslast()\"
type=\"button\">");
document.writeln("<\/form>");
document.writeln("<table border=\"1\">");
document.writeln("<tr>");
document.writeln("<td align=\"center\"><img id=\"sigsviewer\"
src=\"sigs/sig.jpg\"><\/td>");
document.writeln("<\/tr>");
document.writeln("<\/table>");
document.writeln("<p><\/p>");
document.writeln("<form>");
document.writeln("<input value=\"First\" onclick=\"sigsfirst()\"
type=\"button\">");
document.writeln("<input value=\"Previous\" onclick=\"sigsprevious()\"
type=\"button\">");
document.writeln("<input value=\"Next\" onclick=\"sigsnext()\"
type=\"button\">");
document.writeln("<input value=\"Last\" onclick=\"sigslast()\"
type=\"button\">");
document.writeln("<\/form>");
document.writeln("<p><\/p>");
document.writeln("<p>If you have a sig<\/p>");
document.writeln("<\/center>");
Regards David. E. Goble
http://www.pnc.com.au/~degoble
degoble[AT]pnc.com.au | dgoble[AT]pnc.com.au
Po Box 648 (9 Murray St), Kingscote, Kangaroo Island SA 5223