By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,996 Members | 896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

right click

P: n/a
What is the command to prevent "right clicking"
Jan 24 '06 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Prophet wrote:
What is the command to prevent "right clicking"


Don't bother trying - you can only prevent some users under some
circumstances until they work out how to circumvent your prevention
mechanism.
--
Rob
Jan 24 '06 #2

P: n/a

"RobG" <rg***@iinet.net.au> wrote in message
news:tE*****************@news.optus.net.au...
Prophet wrote:
What is the command to prevent "right clicking"


Don't bother trying - you can only prevent some users under some
circumstances until they work out how to circumvent your prevention
mechanism.
--
Rob


I'm just looking to keep our the "honest" thieves
Jan 24 '06 #3

P: n/a
On Tue, 24 Jan 2006 05:33:06 GMT, "Prophet" <M_*****@hotmail.com>
wrote, quoted or indirectly quoted someone who said :
What is the command to prevent "right clicking"


Normally right click does nothing unless you have set up code for it.
So there is nothing to do in the general case. In what context are
you trying to do this?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 24 '06 #4

P: n/a
On Tue, 24 Jan 2006 05:33:06 GMT, "Prophet" <M_*****@hotmail.com>
wrote, quoted or indirectly quoted someone who said :
What is the command to prevent "right clicking"

sorry. asleep at the switch again assuming this was a Java question.

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Jan 24 '06 #5

P: n/a
Prophet wrote:
"RobG" <rg***@iinet.net.au> wrote in message
news:tE*****************@news.optus.net.au...
Prophet wrote:
What is the command to prevent "right clicking"


Don't bother trying - you can only prevent some users under some
circumstances until they work out how to circumvent your prevention
mechanism.
--
Rob

I'm just looking to keep our the "honest" thieves


It won't keep out anyone. If you don't want your content thieved, don't
put if up on the web. Even the dumbest of users will work out that they
can either turn off scripting or save the entire page to their HDD using
save as - and there are plenty of other ways of copying page content
that don't require the use of right-clicking.

On the flip-side, you annoy everyone who wants to use their right mouse
button for any of the other various tasks it can be used for -
bookmarks, forward and back, reload, print, etc.

--
Rob
Jan 24 '06 #6

P: n/a

"Roedy Green" <my******************************@munged.invalid > wrote in
message news:4d********************************@4ax.com...
On Tue, 24 Jan 2006 05:33:06 GMT, "Prophet" <M_*****@hotmail.com>
wrote, quoted or indirectly quoted someone who said :
What is the command to prevent "right clicking"

sorry. asleep at the switch again assuming this was a Java question.

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

actually, I guess that it is not a java question - I want to ensure that
pictures are not taken from the page.
Jan 24 '06 #7

P: n/a
On the flip-side, you annoy everyone who wants to use their right mouse
button for any of the other various tasks it can be used for - bookmarks,
forward and back, reload, print, etc.


Good point........never thought of that
Jan 24 '06 #8

P: n/a
Prophet said the following on 1/24/2006 12:33 AM:
What is the command to prevent "right clicking"


What makes you think I have a right mouse button? Or, that right
clicking brings up any menu?

You can not prevent right clicking so stop trying to figure out how.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 24 '06 #9

P: n/a
Prophet wrote on 24 jan 2006 in comp.lang.javascript:

"RobG" <rg***@iinet.net.au> wrote in message
news:tE*****************@news.optus.net.au...
Prophet wrote:
What is the command to prevent "right clicking"


Don't bother trying - you can only prevent some users under some
circumstances until they work out how to circumvent your prevention
mechanism.


I'm just looking to keep our the "honest" thieves


However, you can only prevent right clicking by only allowing an apple Mac,
or sabotaging a mouse.

Disallowing the right click to have any effect is depends on the number of
different browsers you want it to work on.

IE (only?) simple solution:

<body oncontextmenu='return false'>

Any clientside defence is bound to be frustrated by the more or less
intelligent.

As a prophet, you should know that beforehand.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 24 '06 #10

P: n/a
Prophet wrote:
<snip>
What is the command to prevent "right clicking"

Beyond current technology. To my knowledge, no mouse I've ever seen
supports any means for software to jam a button in the up position.
actually, I guess that it is not a java question
Nobody had any reason to suppose it was. Roedy simply had a slip of the
mind.
I want to ensure that pictures are not taken from the page.


You can't.

There are many ways of pinching images:

- on at least some Mac browsers, Ctrl+click the image
- view the source, and c&p the image URL back into the browser
- get the image URL from a facility that lists the images used on a page
(on a browser that has it)
- get the image URL from a DOM inspector (on a browser that has it)
- take a screenshot of the page

You've absolutely no chance of catching them all.

Stewart.

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
Jan 24 '06 #11

P: n/a
Stewart Gordon said the following on 1/24/2006 7:56 AM:
Prophet wrote:
<snip>
What is the command to prevent "right clicking"


Beyond current technology. To my knowledge, no mouse I've ever seen
supports any means for software to jam a button in the up position.
actually, I guess that it is not a java question


Nobody had any reason to suppose it was. Roedy simply had a slip of the
mind.
I want to ensure that pictures are not taken from the page.


You can't.

There are many ways of pinching images:

- on at least some Mac browsers, Ctrl+click the image
- view the source, and c&p the image URL back into the browser
- get the image URL from a facility that lists the images used on a page
(on a browser that has it)
- get the image URL from a DOM inspector (on a browser that has it)
- take a screenshot of the page


- Drag the image to the desktop of a Windows System

The best way I have seen - to date - to keep "honest thieves honest" is
to section the image into 4 or more smaller images. Use CSS and HTML to
make the images backgrounds of table cells and "reconstruct" the image.
Then overlay a transparent image in a div tag in each cell of the table
with the same transparent image as the background of that div tag.

Not fool-proof but it keeps the honest people honest.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 24 '06 #12

P: n/a
On 2006-01-24, Prophet <M_*****@hotmail.com> wrote:
I want to ensure that pictures are not taken from the page.


Don't tell anyone your password for administering your web page and noone
else will be able to remove them.

If you want to stop them from being copied that's easy too.
But if they can't be copied they can't be viewed.

Bye.
Jasen
Jan 25 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.