Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2005, 10:22 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disable Right-click for Save Image As...

Hello
Do you use javascript to disable Right-click for Save Image As... for .gif, .png, .jpg files??

If so, how do you do that? Using OnMouseOver???

 
Old January 6th, 2005, 11:57 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

http://www.dynamicdrive.com/dynamicindex9/noright2.htm -- this might help you. But I feel that disabling right click isn't a good choice.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old January 7th, 2005, 12:01 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Even if we disable the right click only on images i think the users can flick the images from cache. Think in the lines of "Digital Watermarks"

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old January 7th, 2005, 01:10 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

We cal also use the
oncontextmenu="return false" in body tag like this

<body oncontextmenu="return false;">
Hope this help you

Cheers :)

vinod
 
Old January 7th, 2005, 04:39 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

FYI, oncontextmenu would work in IE5+ only...

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old January 7th, 2005, 09:03 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

There are methods for cross-browser compliancy, but it's all pretty pointless. Check out

http://p2p.wrox.com/topic.asp?TOPIC_ID=24007

...which seems to be a cross-post of this topic.

-Snib - http://www.snibworks.com
Where will you be in 100 years?





Similar Threads
Thread Thread Starter Forum Replies Last Post
disable browser right click?? danielnixon HTML Code Clinic 1 May 19th, 2008 12:11 PM
how to disable Right click at client side ?? jay4ever_2000 ASP.NET 1.0 and 1.1 Professional 1 March 29th, 2006 03:48 PM
How to disable Right-click to Save Picture As.... bekim HTML Code Clinic 11 January 9th, 2005 02:09 AM
Flash object: disable right click on it karib Flash (all versions) 4 April 25th, 2004 01:08 AM
disable right click for onMouseUp dhaywirex Classic ASP Basics 2 March 4th, 2004 05:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.