HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 10th, 1999, 12:34 PM
Chriss
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I was once on a page were everytime you used right-click an aler message came and I couldn't use any teh mouse button. (Pretty effectively stopping me from using any of the options that are in the dropdown menu normally displayed)
Sadly I can't find the page any longer, so, anybody here has any idea???

SORRY!!! I just found out that this has been discussed already!!! SORRY!!! In case anybody wants the code anyway:

<script language="JavaScript1.2">

/*Disable right mouse click Scriptİ Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and
Terms Of Use, visit dynamicdrive.com This script last updated:99/04/05
*/ if (document.all) document.body.onmousedown=new Function("if (event.button==2|
|event.button==3)alert('The right mouse button has been disabled')")
</script>
------------------


[This message has been edited by Chriss (edited 12-10-99).]

Reply With Quote
  #2  
Old December 10th, 1999, 04:04 PM
me
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
using no right click on a site is useless.
anyone with half a brain can view your source. all it really does is stop the novice from viewing your source or grabbing your images.

sawz.com
yankeebarnraising.org
majiklmoon.com

Reply With Quote
  #3  
Old December 11th, 1999, 05:28 AM
Chriss
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I am quite aware of that, but if it's just the novices it's at least a start, isn't it? Plus, if you place the code right, use some frames and additional JavaScripting it can be real useful...
Unfortunately the code I found doesn't quite work, so if anybody could help me with that I'd highly appreciate it! If I simply copy&paste it I get an error message in both NE4.7 and IE5, if I remove the "body" in the fist line it works only in IE5 and not in NE, anybody knows why???

------------------

Reply With Quote
  #4  
Old December 14th, 1999, 12:41 PM
time2brew
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
you are checking if (document.all). That implies IE. If you want to make this work for NS, you need to check for (document.layers). You also need to use captureEvents() and then assign a function to event.CLICK.

I know this is a little cryptic, but with a little more digging, you can find sample code all over the place for this.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Forbid Right Click on html-document...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway