right click disabling in Publisher



Michelle posted a similar question a few days ago.

She got a reply stating that this function was already disabled in Pub 2007
web pages, although only for IE not Firefox.

However I want to ask if disabling the right click on Pub 2007 websites can
be achieved in Firefox, and how it can be done.


I don't think you should...you will piss off a lot of people, but this
javascript snippet seems to work:


<script language=JavaScript>


var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)

document.oncontextmenu=new Function("return false")
// -->


Ok. good. I'm not sure what to do about it though, or where to put this...
sorry it's difficult for me given my level of specific technical knowledge.

could you explain further how is this supposed to work, where should i add
this snippet? etc.

i would appreciate it a lot.

Rob Giordano [MS MVP]

Lemme reinforce DavidF's first sentence...
1- Blocking Right Click pisses people off, especially ones that use right
click to bookmark your site.
2- Blocking Right Click doesn't block anything - basically it's a waste of

Why are you considering doing this?
Just curious.


Select the code snippet between the lines, copy and then go to your
publication , Insert > html code fragment and paste the code in the code
fragment box (Ctrl + V). Drag the code fragment box to somewhere on the
publication where it won't be in the way. Do a web page preview and try to
right click to test.

This is will not keep anyone from taking anything you post on your website,
so think twice about alienating those of us that use right click context
menus extensively. I just don't see any upside of using the code...but to
each their own.



You're being very useful. i appreciate a lot the help. i m actually doing
this as a proyect, not for myself, so i just follow the indications given to

do any of you know how to prevent the image from being dragged with a left
click from website to desktop?

Rob Giordano [MS MVP]

there is no way (repeat; no way) to prevent someone from downloading your

WHY? Because to be seen by the viewer they are ALREADY downloaded to the
viewer's machine...just browse through your temp internet files someday with
an image browser! If it can be seen, it can be gotten.

Rob Giordano
Microsoft MVP Expression Web

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question