I am using some simple functions to create a slideshow. These functions' code is in an external .js file which is called in my pages using:
before closing the script tag i initialize my variables:
// Use the following variable to specify
// the number of images
var imgNumber = 0;
var NumberOfImages = 3;
var img = new Array(NumberOfImages);
// Use the following variables to specify the image names:
img = "1.jpg";
img = "2.jpg";
img = "3.jpg";
i then call the functions through two links:
<a href="#" onclick="imgNumber=previm(imgNumber, NumberOfImages, img);return false;">
<img src="../../../immagini/prev.png" class="arrows" alt="" /></a>
<a href="#" onclick="imgNumber=nextim(imgNumber, NumberOfImages, img);return false;">
<img src="../../../immagini/next.png" class="arrows" alt="" /></a>
everything works on firefox, opera, konqueror, safari... but on Explorer 6 i got an error: imgNumber is undefined...
the only solution i found is to copy and paste the functions' code on every page. Of course i would like to avoid this for maintenance... and can't really understand why it doesn't work.
thanks a lot...