SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Net Senior Citizen tommatthews's Avatar
    Join Date
    Apr 2001
    Location
    Sydney Australia
    Posts
    869
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Disable use of scroll wheel on web page??

    I doubt that this is possible, and have told the client so, but just to be sure, does anyone know if it is possible to disable use of the mouse scroll wheel on a web page??

    The problem is that it is a survey page with multiple choice answers from a drop down menu but when you scroll down the page with the wheel it scrolls through the drop down menu as well and changes the anwser.

    Any ideas??


    affordable website design

    :: sydney australia ::

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the onMouseWheel event can handle this, it can be cancelled and it attaches to SELECT objects according to my reference, but this is IE6 only, so it's not gonna work for nearly everyone. More people still use IE 5.x than use IE6. The application would be something like this...

    <select name="whatever" onmousewheel="return false;">
    <!-- options -->
    </select>

    Also, if you haven't already, you should inform your client that this in not a bug. When a SELECT object has focus, the mousewheel SHOULD scroll through it's options. Many users, including myself, have become accustomed to clicking away from SELECT items before using the mousewheel to scroll the page.

    Or, you could use another form control (radios or checkboxes) in the stead of a SELECT
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    Net Senior Citizen tommatthews's Avatar
    Join Date
    Apr 2001
    Location
    Sydney Australia
    Posts
    869
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks beetle.
    We had already changed single answers to radio's but it is the questions with multiple answer drop downs we really need to use the drop down.

    I am trying a java script solution -

    <script language="javascript">
    function doit()
    {

    document.forms[0].select2.focus();

    }
    function doit2()
    {
    document.forms[0].bob.focus();

    }
    </script>


    affordable website design

    :: sydney australia ::


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
  •