Forum Moderators: open
function SlideShow(increment){
// Name the images in the directory from which it is fetched as "1.jpg","2.jpg" etc then use the following code directly
// read "README.TXT" for more information
var dir="images";//Name of the directory from where images are picked
var limit=5;//Maxmimum number of images in the directory.This means you have 5 images in the directory and the last image name is "5.jpg"
if(increment>0 && increment<limit+1 ){
document.img.src=dir+"/"+increment+".jpg";
document.forms[0].increment.value=increment
}
}
And I get this error message when I click the next button:
error: 'document.forms.0.increment.value' is null or not an object
I made a page with just the javascript and the form and it works fine, but not when I put it in my php page. I put a link to a js file in my header.html file and included the slideshow.html in my php pages, but non of that worked. Do I need to load something in the body tag?