SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question scrolling only with keyboard?

    I want to popup a fullscreen window without scrollbars, onload. BUT: the windows should be scrollable (up&down) with the keyboard (arrow up/down keys). is this possible with js?
    I didn't even make it to disable the scrollbars (I tried it with 'scrollbars=no' , this did not work ) Can somebody here help me with this ??

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stick all the content in a DIV (which is sized at 100% width), trap the keypresses using JS, and move the DIV up and down accordingly by manipulating its position properties.

    You might want to adapt the code used here:
    http://www.dynamicdrive.com/dynamici...nualscroll.htm
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  3. #3
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thx, but how to trap keypresses

    Thx a lot, this should work! But how do I trap the keypresses? (Sorry I'm JS-Newbie) ...

  4. #4
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  5. #5
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb the easy way :

    hi!
    i just found a lot easier solution, a little trick. i simply set the scrollbar colour to the same colour as the backround. so, it's of course there, but you don't see it. you can now scroll with the keyboard.

    the script for colouring the scrollars is easier than the whole other stuff, you only paste this into the head:

    <STYLE>BODY
    {SCROLLBAR-FACE-COLOR: #FFFFFF;
    SCROLLBAR-HIGHLIGHT-COLOR: #FFFFFF;
    SCROLLBAR-SHADOW-COLOR: #FFFFFF;
    SCROLLBAR-3DLIGHT-COLOR: #FFFFFF;
    SCROLLBAR-ARROW-COLOR: #FFFFFF;
    SCROLLBAR-TRACK-COLOR: #FFFFFF;
    SCROLLBAR-DARKSHADOW-COLOR: #FFFFFF}
    </STYLE>

    THX anyway!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •