Someone said:
I know many don't like having right click disabled,
Sure, the only reason I can fathom why this event is available to a script
at all is so that extra functionality may be provided enhancing the content
in the current context that the default behaviour doesn't. In a few rare not
to say unique cases this may be disabling all functionality, such as for
demonstration sites, sites for young children, the elderly or otherwise
easily confused. All others will only be offended. Sites that aspire a
anonymous audience but offer nothing in return (but perhaps a message in an
alert) when a user expects to cash in on the promise, are by definition
written by people who do not think. You invite guests to your house, make
them feel comfortable, light the fire for them, put up their preferred
music, and deny them a drink.
however this is a unique case
?
where clients using viewing this particular site will not
be world wide so it's not going to affect too many people.
Ah, something like an intranet. Not unique.
I have a script that disables right mouse button that works in IE and
older versions of NS but it doesn't work in NS7. Can anyone please
point me to a script that works for NS7.
Ignorance on the user's side is your only weapon in the anti-rightclick war.
In addition to users being able to drag images to desktops or straight into
their favourite image editors, take screenshots, view sources from their
Alt+F menu (or F10, a lesser known key but quite handy sometimes) or browse
their harddisk to retrieve your files, whatever it is that you wish to deny
your users, these and similar bookmarklets (client-side-*added* scripts,
start at
www.bookmarklets.com) nullify any script you have or may be pointed
to:
Enable rightclick: // here and now
javascript:for(i=(f=document.frames).length;i--

with(f
){document.onmouse
down='return true';document.oncontextmenu='return
true';document.onmouseup='return true';document.body.onmousedown='return
true';document.body.oncontextmenu='return
true';document.body.onmouseup='return true';}
Strip all script: // involves reload
javascript:for(i=(f=document.frames).length;i--
with(f){onerror=function
(){return
true};while((es=document.getElementsByTagName('script')).length){es[0].paren
tNode.removeChild(es[0]);}es=document.all;for(i=0;i<es.length;++i){e=es;f
or(p in
e){if(!p.indexOf('on')&&e[p]){e[p]=null;}}}document.write(document.documentE
lement.outerHTML);document.close();onerror=function(){return true};}void 0;
You 're welcome,
Ivo