Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Javascript mousedown and continuous actions

  • 07-12-2007 6:57pm
    #1
    Closed Accounts Posts: 658 ✭✭✭


    Hi

    I'm having a bit of a problem with javascript. I want to implement a scroll function for a group of thumbnail images kept in a div with a certain height. I have a 'down' button, and when the user clicks (onmousedown), I want these thumbnail images to scroll.

    I have code in a function to shift the div up one pixel. I have attached a behaviour to this down button so that onmousedown, it will continually scroll the div, which is something like it is below.
    scroll_button.onmousedown = function()
    {
         scrollDown();
    }
    

    My problem is that the div only moves once, instead of continually like I want it to. Surely if I wanted it to move once, I would use onclick instead. Google actually shows nothing on this for some strange reason. Is there anything simple I am missing. I tried using the setTimeout() function but that didn't make a difference.

    Thanks


Comments

Advertisement