javascript link not working in firefox
Hi I have a numbered image gallery which has a next and previous link which is another way of navigating through the gallery the problem i have that in IE all is fine but doesnt seem to be working in firefox, i would appreciate afew pointers,
regards.
here is the code
<script type="text/javascript">
var currentImage = 1;
function LoadGallery(picNum, captionText)
{
var footer = document.getElementById("footer");
// get the array of all <a> elements in the footer:
var links = footer.getElementsByTagName("a");
// and unclick (change color back to normal) of the current link:
links[currentImage].style.color = "#ffffff";
// then change which is current image
currentImage = picNum; // save current picture number
// and change color of new current link:
links[currentImage].style.color = "#ff9900";
// rest the same
var picture = document.getElementById("childhood_drawings");
if (picture.filters)
{
picture.style.filter="blendTrans(duration=1)";
picture.filters.blendTrans.Apply();
}
picture.src = "../images/childhood_drawings/" + picNum + ".jpg";
if (picture.filters)
{
picture.filters.blendTrans.Play();
}
document.getElementById("topbar").innerHTML = captionText;
return false; // cancel the click
}
function moveBy(what)
{
// where is user asking us to move to??
var moveTo = currentImage + what;
if ( moveTo < 1 || moveTo > 20 ) return; // can't move too far left or right
var footer = document.getElementById("footer");
// get the array of all <a> elements in the footer:
var links = footer.getElementsByTagName("a");
// and then click on that link:
links[moveTo].click( );
return false; // cancel the click
}
</script>
and these are the links that dont work
<a href="#" onclick="return false moveBy(-1)"><</a>
<a href="#" onclick="return false moveBy(+1)"><</a
|