Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: [DHTML] Javascript Mouse Object

  1. #1
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up [DHTML] Javascript Mouse Object

    1) CODE TITLE: Javascript Mouse Object

    2) AUTHOR NAME: Shachi Bista

    3) DESCRIPTION: Emulates the A(ction)S(cript) Mouse object(except some features)

    4) CODE SIZE: 1187 bytes(without images and markup, not zipped)

    5) NOTES: Not sure what the Mouse.hide() and Mouse.show() functions will be useful for.

    6) DEMO: http://shachi.eparliament.org/Mouse.html
    Last edited by shachi; 02-03-2007 at 09:49 AM.

  2. #2
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    All thats Left is A Tiny Black Dot And You Cant Right Click,

    Very nice.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Doesn't do anything in Opera. In FF the context menu is still available no matter what and I do see the mouse as a dot.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Only noticed one thing: Hidden w/o context menu causes the mouse to flicker. Good job though
    - Mike

  5. #5
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    boxxertrumps: there is an option so that you can right click.

    jscheuer1: sorry, haven't tested yet in Opera nor in IE.

    mburt, jscheuer1: I can't see any dots or flickers in FF(Iceweasel) 2.0.0.1 and the context menu works just fine. Do you have any clue why these problems are occurring(because I have none)?

    Thank you all.

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Well, I'm using FF 1.5.0.9, and the errors I posted occurred.
    - Mike

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    FF has a setting that doesn't allow javascript to disable the context menu. I think it is on by default in the FF 1.0.1+ through 1.5.0+ versions. Many NS versions have the same. I don't think Opera allows it to be disabled via javascript, period. You really should test your script in more than one or two browsers before posting it here. A script that hasn't been tested should be presented first in the javascript help section, where you would ask others to test it if you haven't the facilities to do so yourself.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    FF has a setting that doesn't allow javascript to disable the context menu. I think it is on by default in the FF 1.0.1+ through 1.5.0+ versions.
    Are you sure about that? I am just asking because earlier I used to use FF v 1.5.0.5 and I could block the context menu with document.oncontextmenu = function(){return false;} without me playing with any of it's preferences.

    Quote Originally Posted by jscheuer1
    You really should test your script in more than one or two browsers before posting it here. A script that hasn't been tested should be presented first in the javascript help section, where you would ask others to test it if you haven't the facilities to do so yourself.
    I guess I'll have to do the same. Thanks for the suggestion.

    Well anyways, did anyone find an effective use for the Mouse.(hide|show) function(s)?

  9. #9
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    so thats what a context menu is...
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  10. #10
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    boxxertrumps: context menu is the thing that pops up when you right click. Just in case you were confused.

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
  •