Member Panel


Sponsors and Ads

Live Tag Cloud

PC Forum PC Help Forum » Web & Networking » Web Design » [Answered] How can I disable right click

Web Design - [Answered] How can I disable right click posted in the Web & Networking forums; so people cant nabb my pictures and save as on my website, Im using front page express thanks from mat...

JOIN US NOW to remove these Ads

PC Help Forum, the number one FREE computer support website in the search engines
Post New Thread  Reply
  #1  
Old 12-06-2006
math4043's Avatar
Silver Member
 
Join Date: Nov 2006
Posts: 126
math4043 - See this Members User comments on their Profile page
Default [Answered] How can I disable right click

so people cant nabb my pictures and save as on my website,

Im using front page express

thanks from
mat


  #2  
Old 12-06-2006
Bluefish's Avatar
Elite Member
My PC
 
Join Date: Jan 2005
Location: Holland
Posts: 2,189
Bluefish - See this Members User comments on their Profile page Bluefish - See this Members User comments on their Profile page
Default

Hiya mat!

You would have to insert some Java Scirpt into your page's source code, like:

<script language="Javascript1.2">

// (C) 2003 CodeLifter.com
// Source: CodeLifter.com
// Do not remove this header

// Set the message for the alert box
am = "This function is disabled!";

// do not edit below this line
// ===========================
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

</script>
You can find more using Google, search for 'java script disable right-click'.

As you can see I got this piece of code from codelifter.com
The text that starts with //, are comments, and not part of the code.

Blue


__________________
PCHF Rules - You're Welcome!
What's inside my PC? - Prework
  #3  
Old 12-06-2006
Cfnbryn's Avatar
Bronze Member
 
Join Date: Aug 2006
Posts: 16
Cfnbryn - See this Members User comments on their Profile page
Default

That did not work on mine for some odd reason so I used:-

<SCRIPT>function click() {if (event.button==2) {alert('Ooops...\nRight click is disabled!');}}document.onmousedown=click// - -></SCRIPT>


  #4  
Old 12-06-2006
Hengis's Avatar
PCHF Founder & Owner
My PC
 
Join Date: Jan 2004
Location: Newbury, England
Posts: 10,792
PC Experience: Always learning
Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page Hengis - See this Members User comments on their Profile page
Send a message via Skype™ to Hengis
Default

You have already told us that Javascript won't work with your host, therefore you are not going to be able to achieve this Cfnbryn.


__________________
> Pre-Work > System File Checker
> Did we help you? If we did, please consider Donating

Last edited by Hengis; 12-06-2006 at 02:46 PM.
  #5  
Old 12-06-2006
Bluefish's Avatar
Elite Member
My PC
 
Join Date: Jan 2005
Location: Holland
Posts: 2,189
Bluefish - See this Members User comments on their Profile page Bluefish - See this Members User comments on their Profile page
Default

I'm marking this thread Answered.


__________________
PCHF Rules - You're Welcome!
What's inside my PC? - Prework
  #6  
Old 12-06-2006
upgrader's Avatar
Site Manager
My PC
 
Join Date: Jul 2006
Location: C:\ UK
Posts: 6,223
PC Experience: Some Experience
upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page upgrader - See this Members User comments on their Profile page
Send a message via MSN to upgrader Send a message via Skype™ to upgrader
Default

Anyway i you do disable right-click people can print screen if they want, or go in temp internet files to find them.


__________________
PCHF Rules--PCHF Prework--PCHF Downloads

Reply
New! Norton Internet Security 2008 – Download Now Click Here

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT +1. The time now is 05:21 AM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC7
All Graphics & Content Copyright © 2004-2008 - PC Help Forum.com


Back to Top