Blogspot 101: Right-Click Disable
by Revka ~ April 8th, 2008. Filed under: Blogger Tutorials.*To view all of the posts in this series, either click on the following link, or type Blogger Tutorials into our search box located at the bottom of our sidebar.*
I’d like to thank Amy for asking me about this. As I told her, I had never had anyone request this feature, and I have acquired new knowledge because of her question. I must also thank Text*Snippets for providing this code.
If you wish to protect your images from theft, you will be interested in these instructions. This is not a fool-proof method; there is no such thing. However, disabling the right-click function will deter many would-be image thieves, and because this is not javascript, it will work even if your reader’s browser is not javascript enabled.
- Go to the Edit HTML tab.
- Find the
<body>tag. (Scroll down to the end of the CSS code but before the <div> code starts showing up. You should see </head> followed by<body>on the next line.) - Change
<body>to<body oncontextmenu="return false">. - Preview your changes. Right clicking should do nothing.
- Save your template.
It really is that easy!
Please let me know if you have any questions or comments regarding this tutorial. I’d be happy to help you in any way that I can.
*To view all of the posts in this series, either click on the following link, or type Blogger Tutorials into our search box located at the bottom of our sidebar.*












April 16th, 2008 at 12:38 am
Hi I tried this but I get this message all the time, I have no clue what is wrong. Hope you can help, Thanks.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Open quote is expected for attribute “{1}” associated with an element type “oncontextmenu”.
April 16th, 2008 at 8:28 pm
I’ve already contacted Jade and helped her fix the problem, but if anyone else has had the same problem, try copying and pasting the code again. WordPress had changed the way the quotation marks were appearing, and I have since fixed the problem.
Please do not hesitate to let me know if you encounter a problem. I’m more than happy to help you.
Revka
April 17th, 2008 at 2:59 am
I keep trying the code and get this message:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Element type “bodyoncontextmenu” must be followed by either attribute specifications, “>” or “/>”
April 17th, 2008 at 6:57 am
Thank you, Emilee, for letting me know about that. When I redid the code, I accidentally neglected to put a space between body and oncontext menu. I have since fixed the problem.
Thanks again for the heads up.
Revka
April 18th, 2008 at 9:49 am
[...] is quite a selection from which to choose. That is where I found the only code that worked to right-click disable a client’s blog. There are code snippets for all kinds of languages - CSS, HTML, [...]
April 29th, 2008 at 6:49 am
Hi mate, it works in FF but I’d like to block it in Opera too, help me pls.
April 30th, 2008 at 8:44 am
[...] I wrote Blogspot 101: Right-Click Disable, I mentioned that “[t]his is not a fool-proof method; there is no such thing.” Thanks [...]
July 15th, 2008 at 5:26 pm
Thanks so much for the code to disable right click in blogger….java script wasn’t working! Do you know how to disable source code view? That Java script for HTMl isn’t working either.
August 19th, 2008 at 5:56 am
hi… i done… but still can right click… how come???
nice blog u have…
August 29th, 2008 at 12:45 pm
WORKED!!! Thanks! Your blog helped me a lot with customising my first blog
September 16th, 2008 at 6:18 am
[...] | user-saved public links | iLinkShare 3 votesComment on Blogspot 101: Right-Click Disable by aLiYaNNuaR>> saved by narutokun0010 1 days ago2 votesDisable the App Store Kill Switch>> saved by miksmi 2 [...]
October 6th, 2008 at 9:51 am
Wow, finally a code that works!! Thank you so much for helping me disable right clicking on my blog.
October 6th, 2008 at 9:54 am
Oops. I can still l e f t click on my pictures and download them (in Blogger)… any tips on how to disable that?
November 14th, 2008 at 5:23 pm
Hi! I have the same question as Kia - how do you now disable the left click when they can view the full size image and download it that way?? I’m a photographer and have discovered that clients are downloaded my images even with my logo on them and putting them on myspace and stuff……I need to stop it!!