Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: [DHTML] Javascript Mouse Object

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

    Default

    Quote Originally Posted by shachi View Post
    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.
    If you had changed that setting in any earlier version that you were upgrading from, the change would have been inherited.

    I'm sure about NS 7 and FF 1.0.1 (not precisely sure if I have the right numbering convention, what I mean is FF as it first branched off from NS) -any browsers that came later in either of those series would have used the defaults I had previously set as, they were all upgrades. That takes us all the way up to FF 1.5.0.9.

    In any case, javascripting of the context menu is easily disabled in most non-IE browsers and default in many. I think, though it is tricky, that fooling with the context menu with javascript can be disabled in IE as well.
    - John
    ________________________

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

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

    Default

    I guess I need to update the context menu code then.

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

    Default

    You know, I would say that it really isn't something I would pursue. I remember at one point I felt a little differently and even posted upgrades to some of the no-right click scripts here at DD. There were ways of getting around restrictions but, the one in FF required that an alert be fired. Add to that the fact that the measures browsers take to prevent javascript from messing with user options is evolving. And, none of this prevents users from copying content. Even with Flash, there are Flash grabbing applications.

    If folks want the kind of interface that Flash provides, they should use Flash. If, on the other hand, they are just after some of the functionality or special effects and do not wish to require Flash or to take up the bandwidth then, javascript can often fill that need handily.

    If it isn't a matter of preventing copying, the best way that a javascript developer can prevent the context menu from getting in the way of his or her script is to not employ right click for anything. That way the user can use it as they see fit. Most folks know that normal viewing of a web page does not involve right clicking on anything.
    - John
    ________________________

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

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

    Default

    I just need the no-right click to prevent the mouse being shown when the right click is triggered. Nothing else than that. And I made this as Mouse.hide is only available in actionscript and flash isn't available in every browser(but javascript is in most of the browsers).

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

    Default

    If you just want to hide the cursor, use a transparent custom cursor but, it would be better if you could settle on a different trigger than the right click. I've used onmouseover to get a cleaner look to one of those tooltip scripts that has its own arrow. It would depend upon just whatever your needs actually are.

    And, though I think you already do, feel free to work it out however you like. All I meant was to be aware that if you choose to co-opt right click for anything, it will not be as widely implemented on the client side as other triggers. This is unavoidable in javascript because there is a natural and evolving antagonism on the part of browsers to keep it that way no matter how you write the code.
    - John
    ________________________

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

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
  •