...

View Full Version : slide show



blueandconfused
03-14-2005, 03:32 PM
Can someone please look at this and tell me what i am doing wrong and how to fix it? thank you.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Slideshow</title>
<script type="text/javascript" language="JAVASCRIPT">
<!--
var vacationSlides = new Array();
vacationSlides[1] = new Image();
vacationSlides[2] = new Image();
vacationSlides[3] = new Image();
vacationSlides[4] = new Image();
vacationSlides[5] = new Image();

vacationSlides[1].src = "images\hawaii.gif";
vacationSlides[2].src = "images\blue.jpg";
vacationSlides[3].src = "images\wave.gif";
vacationSlides[4].src = "images\waterfall.bmp";
vacationSlides[5].src = "images\is.jpg";

var varCaptions = new Array();
varCaptions[1] = " ";
varCaptions[2] = " ";
varCaptions[3] = " ";
varCaptions[4] = " ";
varCaptions[5] = " ";

var varSlide = 1;
var varTotal = vacationSlides.length - 1;

function fcnSlides(direction){
if (direction == "next"){
(varSlide == varTotal) ? varSlide = 1 : varSlide++;
}else{
(varSlide == 1) ? varSlide = varTotal : varSlide--;
}//end else
if (document.images){
document.imgFrame.src = vacationSlides[varSlide].src;
document.frmControls.txtCaption.value = varCaptions[varSlide];
document.frmControls.txtSlide.value = varSlide;
}//end if
}//end function
var ID = "";
function Views(){
var set;
set = setInterval('0',1000);
document.startclock.seconds.value = set;
}//end function
function start(){
ID = setInterval('Time()',1000);
}//end function start
function stop(){
clearInterval(ID);
}//end function stop

function Time(){
var varat = new Date();
var varhour = varat.getHours();
var varminute = varat.getMinutes();
var varsecond = varat.getSeconds();

var varvalue = varhour > 12 ? varhour - 12 : varhour;
varvalue == 0 ? varvalue = 12 : varvalue;
varvalue += varminute < 10 ? ":0" : ":";
varvalue += varminute;
varvalue += varsecond < 10 ? ":0" : ":";
varvalue += varsecond;
varvalue += varhour >= 12? " PM" : " AM";
document.startclock.time.value = varvalue;
}//end function
//-->
</script>
</head>

<body bgcolor="white" onload="Views();" onload="Time();">
<script language="JAVASCRIPT" type="text/javascript" src="dynamicgreeting.js">
<!--
document.write(vargreeting);
//-->
</script>

<div align="LEFT">
<h2>Photos of Your Future Vacation</h2>

<img src="images\pearlharbor.jpg" name="imgFrame" width="320" height="240">

<form name="frmControls">
<p><textarea name="txtCaption" rows="2" cols="50">
</textarea><br>
<br>
<input type="button" value="Previous Slide" onclick="fcnSlides('previous');">
<input type="button" value="Next Slide" onclick="fcnSlides('next');"><br>
<br>
<input type="text" value="1" name="txtSlide" size="1"></p>
</form>
<form name="startclock">
<input name="time" size="10">
<input type="button" name="start" value="Start" onclick="start();">
<input type="button" name="stop" value="Stop" onclick="stop();"><p></p>
<input name="seconds" size="10"></form>
</div>
</body>
</html>

vwphillips
03-14-2005, 05:12 PM
change start() to StartIt()
&& change stop() to StopIt()

stop & start are reserved

and best to use onclick="javascript:StartIt();"

Is that it??

or somthing else surpost to happen

mhonman
03-15-2005, 01:34 AM
goto www.woodenmantles.com

they have a nice slide show there just copy the source code



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum