Hello,
I am trying to edit an image slideshow script I found on DynamicDrive.com ( Basically, I am trying to move the array containing the images out of the main script, and put it into the body. This is because the image urls are pulled in by a Perl script after the header and first part of the body has been printed.
I have nearly achieved this by removing the array from the main script, removing the body onload event and including the following script within the body directly above the form:
However this change has made the script buggy i.e. when loaded, the first image is blank.
How would I go about achieving the task of moving the declaration of the array "Slides" into the body, without breaking the slideshow. Or would this be an inpractical solution.
Thank you,
Chris
I am trying to edit an image slideshow script I found on DynamicDrive.com ( Basically, I am trying to move the array containing the images out of the main script, and put it into the body. This is because the image urls are pulled in by a Perl script after the header and first part of the body has been printed.
I have nearly achieved this by removing the array from the main script, removing the body onload event and including the following script within the body directly above the form:
Code:
<script language="JavaScript">
var Slides = new Array('myimage1.jpg','myimage2.jpg','myimage3.jpg');
window.onload = StartSlideShow();
</script>
However this change has made the script buggy i.e. when loaded, the first image is blank.
How would I go about achieving the task of moving the declaration of the array "Slides" into the body, without breaking the slideshow. Or would this be an inpractical solution.
Thank you,
Chris