Click to See Complete Forum and Search --> : can someone please help me with the javascript for a slideshow?
shesagiant
05-02-2003, 04:07 PM
i am having issues. it worked when i just had one image, but when i added more images how i thought i should, it didnt put them in a slideshow format it just put them all on the same page. please please help via aim? meeshrox
thank you!!!
AdamGundry
05-02-2003, 04:16 PM
What are you using to create this slideshow? Can we see some code? Without more detail, it is unlikely anyone could help you.
Adam
shesagiant
05-02-2003, 04:17 PM
k i think i fixed the problem i had with all the images on the page....
but the slideshow still isnt working.
and it says error on page.
so i guess my question is, where in the code do i put the other images so the slideshow will work?
shesagiant
05-02-2003, 04:19 PM
Originally posted by AdamGundry
What are you using to create this slideshow? Can we see some code? Without more detail, it is unlikely anyone could help you.
Adam
oh sure. sorry.
i got the code from javascriptsource
<!-- TWO STEPS TO INSTALL BASIC SLIDESHOW:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Mike Canonigo (mike@canonigo.com) -->
<!-- Web Site: http://www.munkeehead.com -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
NewImg = new Array (
"images/1.gif",
"images/2.gif",
"images/3.gif"
);
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[ImgNum];
}
}
function auto() {
if (lock == true) {
lock = false;
window.clearInterval(run);
}
else if (lock == false) {
lock = true;
run = setInterval("chgImg(1)", delay);
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<img src="images/1.gif" name="slideshow">
<table>
<tr>
<td align="right"><a href="javascript:chgImg(-1)">Previous</a></td>
<td align="center"><a href="javascript:auto()">Auto/Stop</a></td>
<td align="left"><a href="javascript:chgImg(1)">Next</a></td>
</tr>
</table>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.73 KB -->
im just trying to alter this with my images. i put my images in the script part of the code. and.. im sorta lost.
shesagiant
05-02-2003, 04:45 PM
k nevermind i found an easier code and i got it.