Hi,
I am developing a website that allows users to be able to navigate the website by only clicking on a soft switch. All links are rotated through an array when a link is highlighted and the user clicks the link it is selected. I need to be able to scroll the div1 contents up and down by use of an onmousedown event but I am not sure where to put it? Should it be in the javascript code or should it be placed when calling the javascript from the array.
*The user clicks on rotate8
<img src="images/scrollup1.jpg" name="Rotate9" width="70" height="70" id="Rotate9">___
<img src="images/scrolldown1.jpg" name="Rotate8" width="70" height="70" id="Rotate8"></a></a>
*This says to the the array7 to run the javascript
arrayLinks[7]="javascript:scrollDivDown(id)";
arrayLinks[8]="javascript:scrollDivUp(id)";
*This is the javascript
<script>
defaultStep=1
step=defaultStep
function scrollDivDown(id){
document.getElementById(id).scrollTop+=step
timerDown=setTimeout("scrollDivDown('"+id+"')",5)
}
function scrollDivUp(id){
document.getElementById(id).scrollTop-=step
timerUp=setTimeout("scrollDivUp('"+id+"')",5)
}
</script>
But where should I put the mousedown event as it is not working and I have tried different ways.
Any help would be great thank you.