Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default No right-click

    I wonder if anyone can help. I'm seeking to "protect" the images on my website
    against right clicking. I have found the following JavaScript:

    <script language="Javascript1.2">

    // Set the message for the alert box
    am = "This function is disabled!";

    // do not edit below this line
    // ===========================
    bV = parseInt(navigator.appVersion)
    bNS = navigator.appName=="Netscape"
    bIE = navigator.appName=="Microsoft Internet Explorer"

    function nrc(e) {
    if (bNS && e.which > 1){
    alert(am)
    return false
    } else if (bIE && (event.button >1)) {
    alert(am)
    return false;
    }
    }

    document.onmousedown = nrc;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    if (bNS && bV<5) window.onmousedown = nrc;

    </script>

    Obviously this is coded to work with Netscape & IE, but can anyone tell me
    what code to insert so that it works in the ever-popular Firefox?

    Many thanks

    ploughman1 Guest

  2. Similar Questions and Discussions

    1. double click causes click-event anddoubleClick-event
      I too am interested in a response to this. I see all kinds of information on how to enable the double-click event, but not how to distinguish...
    2. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    3. Click / Double Click
      Am I doing something wrong? Wrong coding? Wrong handler? I am rying to get the button to fire on clicking..... it WILL work on "double click"... any...
    4. Single click vs double click in mouseDown and mouseUp
      For a double click mouseDown and mouseUp catch 2 event: the first report clickCount value 1 and the second report value 2. How to respond to a...
    5. Datalist selects Item after first click, but does apply the SelectedItemTemplate after the second click only
      Background: On my webform a simple datalist shows one column. The databind is done in the page_load event. In the ItemTemplate a linkbutton serves...
  3. #2

    Default Re: No right-click

    Please don't fool yourself into thinking that this will do anything other
    than drive people away from your site.

    Watermark your images, and let it go at that. Anything else is a waste of
    your time and effort and an insult to your visitors.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "ploughman1" <webforumsuser@macromedia.com> wrote in message
    news:dhlrh4$id0$1@forums.macromedia.com...
    >I wonder if anyone can help. I'm seeking to "protect" the images on my
    >website
    > against right clicking. I have found the following JavaScript:
    >
    > <script language="Javascript1.2">
    >
    > // Set the message for the alert box
    > am = "This function is disabled!";
    >
    > // do not edit below this line
    > // ===========================
    > bV = parseInt(navigator.appVersion)
    > bNS = navigator.appName=="Netscape"
    > bIE = navigator.appName=="Microsoft Internet Explorer"
    >
    > function nrc(e) {
    > if (bNS && e.which > 1){
    > alert(am)
    > return false
    > } else if (bIE && (event.button >1)) {
    > alert(am)
    > return false;
    > }
    > }
    >
    > document.onmousedown = nrc;
    > if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    > if (bNS && bV<5) window.onmousedown = nrc;
    >
    > </script>
    >
    > Obviously this is coded to work with Netscape & IE, but can anyone tell me
    > what code to insert so that it works in the ever-popular Firefox?
    >
    > Many thanks
    >

    Murray *TMM* Guest

  4. #3

    Default Re: No right-click

    Wow! That told me, then!
    Thanks, as ever for the input Murray.
    ploughman1 Guest

  5. #4

    Default Re: No right-click

    You're welcome!

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "ploughman1" <webforumsuser@macromedia.com> wrote in message
    news:dhlugp$lqs$1@forums.macromedia.com...
    > Wow! That told me, then!
    > Thanks, as ever for the input Murray.

    Murray *TMM* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139