Simple question for JavaScript programmers...

Discussion in 'OT Technology' started by grooves12, Dec 9, 2004.

  1. grooves12

    grooves12 New Member

    Joined:
    Oct 3, 2003
    Messages:
    5,561
    Likes Received:
    0
    Location:
    Bay Area, CA
    Does anyone know the code for executing the "page up" and "page down" buttons??
     
  2. RichSpidizzy

    RichSpidizzy NEMO ME IMPVNE LACESSIT

    Joined:
    Dec 7, 2004
    Messages:
    154
    Likes Received:
    0
    Location:
    Queens, NY
    what do you mean?

    Do you want the page to scroll up/down after some JS event occurs?
    -or-
    Do you want some JS event to happen when someone presses the page up/down keys?
     
  3. grooves12

    grooves12 New Member

    Joined:
    Oct 3, 2003
    Messages:
    5,561
    Likes Received:
    0
    Location:
    Bay Area, CA
    Here is really what I am trying to accomplish...

    I have Mouse Gestures 1.0 for firefox, and you can make custom gestures using JavaScipt code. Their "Scroll up" and "Scroll down" gestures are useless because is only goes the equivalent of 3-4 notches on a wheel mouse. I want to make a custom one that would be the equivalent of pressing "page up" or "page down" on the keyboard.
     
  4. RichSpidizzy

    RichSpidizzy NEMO ME IMPVNE LACESSIT

    Joined:
    Dec 7, 2004
    Messages:
    154
    Likes Received:
    0
    Location:
    Queens, NY
    aha, ok. that would have been the first option I gave ya.... Lemme look into it.
     
    Last edited: Dec 10, 2004
  5. RichSpidizzy

    RichSpidizzy NEMO ME IMPVNE LACESSIT

    Joined:
    Dec 7, 2004
    Messages:
    154
    Likes Received:
    0
    Location:
    Queens, NY
  6. WERUreo

    WERUreo Imua!

    Joined:
    Oct 15, 2003
    Messages:
    566
    Likes Received:
    0
    Location:
    Daytona Beach, Florida
    So basically, what you need is just
    Code:
    window.scrollBy(0,some number)
    some number is just the amount of pixels to scroll.

    Or you could just switch to All-In-One Gestures. Of the two extensions, I like the way All-In-One Gestures works better than Mouse Gestures 1.0, and I just tried assigning gestures to Scroll Up and Scroll Down, and it moves the page the same amount as Page Up and Page Down do.
     

Share This Page