Below is code I plan to incorporate in my asp application. I cannot get the slid show to work. It shows the 1st image but no image rotation. Can anyone tell me what I am doing wrong? Thank you
<head>
<SCRIPT LANGUAGE="JavaScript">
NewImg = new Array (
"C:/Documents and Settings/vgwprja/My Documents/Visual Studio 2005/WebSites/TestSlideShow/Images/01.jpg",
"C:/Documents and Settings/vgwprja/My Documents/Visual Studio 2005/WebSites/TestSlideShow/Images/02.jpg",
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;
//Time delay between Slides in milliseconds
var delay = 3000;
var lock = false;
var run;
function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg
;
}
}
function auto() {
if (lock == true) {
lock = false;
window.clearInterval(run);
}
else if (lock == false) {
lock = true;
run = setInterval("chgImg(1)", delay);
}
}
</script>
</head>
<body>
<img src="C:/Documents and Settings/vgwprja/My Documents/Visual Studio 2005/WebSites/TestSlideShow/Images/01.jpg" onload= "auto()"
alt="No image" name="slideshow"/>
</body>
</html>
<head>
<SCRIPT LANGUAGE="JavaScript">
NewImg = new Array (
"C:/Documents and Settings/vgwprja/My Documents/Visual Studio 2005/WebSites/TestSlideShow/Images/01.jpg",
"C:/Documents and Settings/vgwprja/My Documents/Visual Studio 2005/WebSites/TestSlideShow/Images/02.jpg",
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;
//Time delay between Slides in milliseconds
var delay = 3000;
var lock = false;
var run;
function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg
}
}
function auto() {
if (lock == true) {
lock = false;
window.clearInterval(run);
}
else if (lock == false) {
lock = true;
run = setInterval("chgImg(1)", delay);
}
}
</script>
</head>
<body>
<img src="C:/Documents and Settings/vgwprja/My Documents/Visual Studio 2005/WebSites/TestSlideShow/Images/01.jpg" onload= "auto()"
alt="No image" name="slideshow"/>
</body>
</html>