Forbid Right Click, Help! |
![]() ![]() |
Forbid Right Click, Help! |
Apr 19 2005, 05:38 PM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 137 Joined: Feb 2005 Member No: 103,647 |
When I put this
var message="rawr."; function click(e) { if (document.all) { if (event.button==2||event.button==3) { alert(message); return false; } } if (document.layers) { if (e.which == 3) { alert(message); return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; // --> In my header, it just puts the code on my site. But before it prevented people from right clicking! I took it off for a sec to save a picture, and when I put it back on, it stopped working! Help! |
|
|
|
Apr 19 2005, 05:40 PM
Post
#2
|
|
![]() define our lives for us. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 11,656 Joined: Aug 2004 Member No: 43,293 |
That code looks.. wrong..
It just does. Is your right-click code the type when somebody right-clicks, a pop=up comes up? |
|
|
|
Apr 19 2005, 05:43 PM
Post
#3
|
|
![]() crushed. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,432 Joined: Jun 2004 Member No: 20,026 |
try putting this code into your website stats:
CODE <BODY ONCONTEXTMENU="return false">
|
|
|
|
Apr 19 2005, 05:44 PM
Post
#4
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 137 Joined: Feb 2005 Member No: 103,647 |
QUOTE(Spiritedfreak @ Apr 19 2005, 6:40 PM) That code looks.. wrong.. It just does. Is your right-click code the type when somebody right-clicks, a pop=up comes up? Yea, its a popup. It worked before, but whne I took it out and put it back in, it stopped working. I noticed the "-->" at the end, do I need something like that at the beginning? QUOTE(bballbabiegrl @ Apr 19 2005, 6:43 PM) But I need it to popup when someone clicks |
|
|
|
Apr 19 2005, 05:47 PM
Post
#5
|
|
![]() define our lives for us. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 11,656 Joined: Aug 2004 Member No: 43,293 |
Use this code:
|
|
|
|
| *mona lisa* |
Apr 19 2005, 05:47 PM
Post
#6
|
|
Guest |
I don't know, but I do know that you don't start off a script with this:var message="rawr.";
I think it needs something like try that. edit Toby got to it first. This post has been edited by gotnoheart: Apr 19 2005, 05:48 PM |
|
|
|
Apr 19 2005, 06:39 PM
Post
#7
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 4,591 Joined: Dec 2004 Member No: 77,305 |
Why don't you try searching for previous posts first. Read my post in this topic: http://www.createblog.com/forums/index.php?showtopic=75698
|
|
|
|
Apr 19 2005, 06:59 PM
Post
#8
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 137 Joined: Feb 2005 Member No: 103,647 |
Thank you SpiritedFreak and gotnoheart!
QUOTE(JAMx33 @ Apr 19 2005, 7:39 PM) Why don't you try searching for previous posts first. Read my post in this topic: http://www.createblog.com/forums/index.php?showtopic=75698 Im not trying to prevent someone from jacking my source code... |
|
|
|
Apr 19 2005, 07:19 PM
Post
#9
|
|
![]() Amberific. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 12,913 Joined: Jul 2004 Member No: 29,772 |
|
|
|
|
![]() ![]() |