SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    UK
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using onmousedown AND onmouseover together

    Is their any way to use onmouseover and onmousedown together?

    Seems to work fine in ie, but not in ff.

    This is my code:
    Code:
    <a href="Javascript:void(0)" onmouseover="scrolldown(200)" onmouseout="stopall()" onmousedown="scrolldown(50)" onmouseup="stopall()">
    Its a custom scrollbar. Should scroll slowely onmouseover, and speed up onmousedown. (speeds are other way round, 50 is faster than 200)

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you have there should work.
    Code:
    <html>
    <head>
    <script>
    function el(e, v)
    {
      e = e || window.event;
      if (!e) return;
      document.getElementById('dbg').innerHTML += e.type + '(' + v + '), ';
    }
    </script>
    </head>
    <body>
    
    <p><a href="javascript:void(0)"
          onmouseover="el(event,1)"
          onmouseout="el(event,2)"
          onmousedown="el(event,3)"
          onmouseup="el(event,4)">TEST</a></p>
    
    <div id='dbg'></div>
    
    </body>
    </html>


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
  •