Jul 24, 2008

Javascript : No Right Click Script !@ - This script will allow you to protect your source coad !

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP
Pages: 1, 2

free web hosting

Javascript : No Right Click Script !@ - This script will allow you to protect your source coad !

pixelstat
This script will help you to protect your source code

Add this to <BODY> Section of your site !


HTML
<script language=JavaScript>

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")


</script>



Thank You !

Notice from BuffaloHELP:
Use proper bbcode tags when posting codes. We have Programming > Javascript dedicated section. Moving.

 

 

 


Reply

mynitr
Thanks for the script. But if you do a web search, you can find many more similar scripts with advanced functionalities along with "no right click".


Reply

FirefoxRocks
Does it work when you press CTRL+F3 in Opera?
What about CTRL+U in Netscape and Firefox?
Will it block View > Source in most browsers?

I haven't tried it yet. Just consider saying "Block Right-click Menu" instead of "Protect your Source Code". That way people will be less confused.

Reply

delivi
This script is widely availabe in the net. Try to get some script that makes it not possible to view the code using, View> Source.

Reply

gaea
I've seen this type of script before. In my opinion it is kinda useless. I say this mostly because in virtually every browser you can click on the "View" menu and then choose "Page Source" from the list...which will accomplish the exact same thing.

As a matter of fact, I don't believe I've ever seen this code deployed on a professional site...usually only on hastily made blogs, etc.

I hand code all my pages, and honestly wouldn't really care if someone copied pieces of the code (ignoring php for a moment). Most of the time it is entirely specific to my page, so the amount of effort required to change/contort it into being used in something else would probably be close to just rewriting it from scratch. As they say, "limitation is the highest form of compliment."

If you are really concerned about keeping the coding of your site secure then you should either a) encrypt the entire thing and then parse it through a filter (this will greatly increase the cpu usage on your server, as well as requiring more time for the page to load); or B) purposefully write incredibly convoluted code that no one but yourself can understand (which is a waste of time, and probably won't be nearly as efficient as a correctly written page would be). In other words, I'd say both options are kind of a waste of time.

Just my 2cents.

 

 

 


Reply

Plenoptic
Ya I have used that before but the Control + C still usually works for the ones I have tested anyway. I don't know if there will ever be a fool proof script that can keep people from copying but that does help. You just have to find a way to stop from the selecting of text on a screen like making it into pictures but that would take too much time.

Reply

Mich
In most cases, at least those persons using iExplorer, you can save the whole page including all graphics by going up to File> Save As. There are so many tricks to copying sites I don't see how it can be totally prevented. But, remember, it is a great compliment when somebody wants to imitate your work. wink.gif

Reply

TypoMage
Hmm Disabling right click. I ahve heard of that. I tried right clicking one time. I message poped up saying Hahaha Nice try no doing that here. But it is still possible to copy ever piece of that Site. Easily. Unless you are not smart enough too.

Reply

hype
This script actually is used to fool internet users that have little experience in it... Practically, all of us here knows how to work our way around with it, with a simple View --> Source method! Perhaps its better without the script so as to save the loading time of your webpages... smile.gif

Reply

Lyon2
I know a trick to bypass that protection code, of course you can just click the edit menu or whatever and then click view source code, and that works in many browsers, but my trick does not use that, it is a trick with the keyboard buttons.

The trick:
Right click in any part of the page
Then a box will appear saying that you can't do it, or whatever
Then don't release the right click
at the same time, click ok with the left mouse without releasing the right click, then release the right click, and voila, the right click functions will appear.

Anyway, the best is to encrypt the source code of the page, not only for protect your work, but also to protect yourself from the google hackers.

Reply

Latest Entries

iGuest
Can not disable Right Click in opera
Javascript : No Right Click Script !@

From m y experience I came to know that Opera browser doesn't support any scripts tht are written to disable right click. I there is a way to disable right click in opera pls share it... This would be very helpful

-reply by kalyan

Reply

michaelper22
I have seen these scripts before; they are totally useless in any browser other than IE. With these "other browsers", you can very easily disable changing of right click actions. In short, there are very few (but still some existant) ways to secure your source code.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. javascript disable right click in field - 8.57 hr back. (1)
  2. disable right click using css - 15.20 hr back. (1)
  3. “save as” without right click using javascript - 19.41 hr back. (1)
  4. disable right click on a field using javascript - 25.42 hr back. (1)
  5. rightclick javascript - 25.42 hr back. (1)
  6. no right click script for ie and firefox - 29.43 hr back. (1)
  7. java script no copy firefox - 32.82 hr back. (1)
  8. javascript to disable right click using keys but without alert popup - 35.20 hr back. (1)
  9. allow script to receive right click does not work in opera - 37.49 hr back. (1)
  10. opera right-click in flash - 37.75 hr back. (1)
  11. no right click on images code for firefox and safari - 68.99 hr back. (1)
  12. html protect allows left click - 69.44 hr back. (1)
  13. how to use no right click javascript in firefox 3 - 76.07 hr back. (2)
  14. javascript no left click - 81.93 hr back. (1)
Similar Topics

Keywords : javascript click script script source coad

  1. Javascript Close Window - Javascript close window (12)
    Hi does anyone have a code to close the browser window. This code needs to be used to close an
    actual full sized window, not a pop-up window....
  2. Auto Run Java Program - Run Java program on double click (11)
    Some of the installables in java comes in form of .jar file, one has to just double click or type
    "java -jar file.jar", and it starts executing. The reason for this is a line appended in the
    MANIFEST.MF file of that jar file. For writing a similar jar file of your own, just write your java
    file, then compile the same and create a jar file. Create a MANIFEST.MF file and the content should
    have the followings: CODE Manifest-Version: 1.0 Created-By: xyz Main-Class:
    xyz.MainClass Here xyz.MainClass is the main class. Now create a jar file with the man...
  3. Adding Rows & Columns In Html Table Using Javascript - (1)
    I'm trying to create a website with a form that collects some user information to store in MySQL
    database. However, I've a problem when I want to dynamically add new rows and columns in the
    HTML table so that the user can add more information in the dynamically added textboxes. Here's
    what I have: CODE <table border="0" width="90%"
    align="center" id="itemsTable"> <tr>
    <td width="20%"> Quantity
    <...
  4. Adjusting Rows/cols Of Frames In Frameset Using Javascript Is Not Working In Firefox 3 Is Not Working - (4)
  5. Java Vs Javascript - (11)
    I thought they were completely different things. Surely javascript should be seperated from the rest...
  6. Java Script Drop Down Menu With Css - - a full code for a dynamic drop down (2)
    Introduction This is a code that I use to dynamically create the drop down menus. First, you have
    to edit the following code and put it in your Javascript. Notice : /*** SET BUTTON'S FOLDER HERE
    ***/. Edit that to your folder. Also, the /*** SET BUTTONS' FILENAMES HERE ***/. This creates a
    mouseover when the drop down is activated. Put all your onmouseover images under: oversources = new
    array; and your onmouseout images under : upsources. Be sure to set your on and out images above
    each other. CODE /*** SET BUTTON'S FOLDER HERE ***/ var buttonFold...
  7. [help] Java Script: Window.open - Works with Firefox, not IE (8)
    CODE <HEAD> var popUpWin=0; function popUpWindow(URLStr) {
    if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); }
    popUpWin = open(URLStr, 'GunBound Tactics: Screenshots',
    'width=820,height=550,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,top=90,left=90')
    ;; } </HEAD> <BODY> <a
    href="javascript:popUpWindow('/f11/clipped.php');"><b>Clips&
    #60;/b></a> This is a script for opening a new window. It works ...
  8. Jsp Or Java Chat Script Like Mig33 - (4)
    so most of you guys know mig33. its a wap application,probaly java.most kindly to be java. does
    anyone have java knowlege or knows where i can get a chat script like mig33? i also know this server
    supports jsp so im planing to use it for my application. i was hosted here last year but moved
    because i found a better host. now im back just to use the jsp on this server. Im planing to run
    chat applictions so if any one wants to help me in my project let me know....
  9. Document.write & Noscript Questions (javascript) - (1)
    I am trying to use javascript to include a stylesheet depending on the user's resolution. The
    HTML CODE <head> <meta http-equiv="Content-Type" content="text/html;
    <?php echo _ISO; ?>" /> <?php if ($my->id) {
    initEditor(); } ?> <?php mosShowHead(); ?>
    <noscript><link rel="stylesheet" type="text/css"
    href="http://www.highimpactart.org/templates/_HighImpactArt_/1024/1024.css"
    /></noscript> <script type="...
  10. Javascript Slideshow Tutorial - How to make a slideshow in JavaScript (3)
    JavaScript Slideshow Tutorial I'm going to show you how to make a impressive JavaScript
    slideshow. First, you're probably asking: why would I want to make a slideshow in JavaScript?
    There are a number of reasons. First, you don't have to build a new HTML page for each picture.
    Secondly, the page will load much faster because the of the compactness of the page. Ok let's
    get started with this example. First we'll add a <script> tag in the of our HTML
    document. In that script tag we will build the following: CODE first = 1; la...
  11. Hiding <div> Boxes With Javascript - Javascript Help #1 (8)
    This is my first help post in this Java/JavaScript section. Can someone write/find me a piece of
    code that will hide boxes? Preferred stuff: There is a bar that has the subtitle of the box
    contents. A button on the right side of the bar shows and hides the div box. Contents are in a box
    with a border and slides in and out of the bar smoothly and relatively quickly. Box MUST be
    customizable using CSS internal/external stylesheets . Any help would be appreciated. All codes
    will be tested and best code be selected....
  12. Flash And Javascript Interaction - swfobject js questions (1)
    I don't know if anyone on here is familiar with this script. You can check it out here .
    Basically it's a script that is supposed to give you javascript control over a flash object. I
    am using it for a flv player. My question is this. I would like to display the current file's
    title in a span element on the page, but the function described to gather the information for the
    current file doesn't seem to work for me. The function, as outlined on on this page looks
    like this: CODE function getUpdate(typ,pr1,pr2,swf) { if(typ == &#...
  13. One Click Copy And Paste To Clipboard - in simple Javascript (5)
    I've been search the web for few weeks to see if Java can do one click copy and paste function
    to the clipboard and then I can just Ctrl-V the copied "texts." I initially got this idea when I
    began to approve hosting application. Instead of writing the same message over and over again, I
    decided to make me a page where I can simply copy the code to appropriate answers. And seems like my
    laziness is the mother of inventions /laugh.gif' border='0' style='vertical-align:middle'
    alt='laugh.gif' /> Instead of doing Ctrl-A, Ctrl-C then Ctrl-V to the post board I started...
  14. Capturing Username Of Computer - using javascript, is it possible? (3)
    I wondering if it is possible to try and make a java script to get the computer username and log it?
    /huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> edit Topic
    title ...
  15. Javascript Object Node Referencing Help - (5)
    I've got two buttons with an onclick event to set the hidden input field to a certain value then
    continue submitting the form. I have more than one form on display on the page and I don't want
    to use ids. Is there a way I can reference it from the button/button onclick event? the forms is
    laid out like this echo" "; echo" "; echo" Edit "; echo" Delete "; echo" ";
    So basically the idea is to fire off new_modify function and start referencing the hidden input type
    with name of do and set it to the supplied argument then continue submitting t...
  16. Problem With Java Script Popup Form - Doesnt work in Safari (1)
    This code wont work in Safari, but works fine in Firefox 2. Can someone help. The error pops up
    however. It just doesn't do anything unless you dont pick one and then it says Pick a Windows
    tweak, but if you DO pick one it doesnt even try to load anything. Everything you see below is
    everything inside my PHP Include. If you would like to view my actual site it's
    http://boozkerstweaks.trap17.com There might be PHP errors and stuff right now, but i am working on
    those, but this i can not get. CODE <tdvalign="top" class="right">
    ...
  17. Helpful Registry Edit For Java Programmers - Command Prompt on right click menu (2)
    With this registry edit you can easily open the current folder in prompt without going through any
    Change Directory commands (cd). This is useful for people like me who are programming in JAVA, and
    every time to create class files and test them I have a diificult time just entering the commands in
    Prompt. But if you don't want to use this registry edit you can create the directory in
    C:\ drive like C:\files so you have to navigate very little in prompt. If you are
    experienced in regedit you can do it yourself shown below OR download the attachment and app...
  18. Simple Firefox Vs. Ie Script Bug; Need A Little Help - Simple script works in Firefox but not IE. (3)
    Hello I have a simple .js file that seems to work in Firefox but not IE. The error could totally be
    my syntax, just not sure why it's working in one browser and not the other. All I'm doing
    is waiting for an image to load completely before redirecting. I added an extra step that waits an
    additional 1.5 seconds just for 100% smooth transition (sometimes firefox reroutes before the image
    is actually fully loaded). This script works perfectly for Firefox, meaning if the image is already
    loaded/cached it reroutes immediately and if not, then waits with extra dela...
  19. Is It Possible To Create A Web Based Mmo In Javascript? - And could there be free movement without reloading the page? (4)
    I would like to get some information before launching myself to the JS libraries. Is it possible to
    load maps or images and with the press of a button "scroll" or move the image inside some kind of
    window up, down, left or right? It would be like scrolling an image sideways, upwards or downwards.
    I would also like to know if multiple connections can be made and lets say there was a user
    standing in the location (127, 160) of the map, would there be the possibility of loading the image
    of that player? Maybe with database connections and storing their information there?...
  20. Javascript Error - Error "missing ) in parenthetical" with JSON statment (2)
    Hello! I'm trying to execute following code: CODE a=new Array();
    a=eval("("+responseText+")"); for (prop in a) {
    e=document.getElementById(prop) if (e) {e.innerHTML=a[prop]}
    and I recieve error in CODE a=eval("("+responseText+")");
    what's wrong? responseText it's result from php2js() function. Apache 2.2.6/PHP5.2.5/MySQL
    5.0.45...
  21. I'm Making My Own Javascript Only Rpg :d - earliest beta perhaps (7)
    Well I randomly decided to make an rpg. So far its all in javascript, and that's how I intend to
    keep it. Eventually you will be able to save with a permanent cookie or by getting an encrypted
    code. Right now you can only walk around and go to 2 maps. I have used preloading, and the maps load
    extremely fast. But there is one problem, maybe you guys could help but I mostly just posted to tell
    you guys something /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif"
    />. Well the problem is the character images load extremely slow and i know wh...
  22. Web Applications: J2ee Or Javascript/css/html - (1)
    I'm currently programming web applications using AJAX/CSS/HTML and they're pretty
    cross-browser. However when I heard of this language J2EE I had second thoughts. But I ran into GWT
    (Google Web Toolkit) which compiles Java code to Javascript/HTML. With this said, my mind tells me
    that Java developers desire to use Javascript/HTML languages to create web applications over Java.
    So, which one should I start developing web applications in? Java? or Javascript...
  23. I`m New To Javascript. - (5)
    Does anybody know where I can find a good site to teach me more than I already know. I know about
    functions and how to set up alert scripts. I really wanna make a counter script....
  24. Special Wii Javascript - New Javascript Objects for Wii (2)
    I found on Nintendo.com a while back some new javascript objects dealing with the Wii Remote. I
    have decided to post a link to these new Javascript objects here. Wii javascript These new
    Javascripts can detect whether or not a Wii Remote is enabled, the position of the pointer, and even
    the tilt of the remote. It also has an object that determines the keypress of the Wii. These can be
    very useful for Wii sites. Maybe have a menu load with AJAX when the remote is tilted. Add button
    functionality such as when the A and B button are pressed, the form is submitted. Just...
  25. Lottery Script Help - (3)
    I have written a simple lottery script that I want to manually use with my InvisionPlus forum and
    main web site. Currently I have a page with the lottery script on my main page that can be accessed
    from a redirection forum on my forums. The script creates a button on the lottery page of my main
    site that creates a number entry prompt that acts as a password field. If the lotto number is
    correct, then my user is taken to my winners forum where they post they won. The purpose of the
    lotto is for members to win account upgrades. My script though is not working. Here is the ...
  26. What's The Relationship Between Javascript And Java - are they the same or different (5)
    I think most of you always confuse about java and javascript .So I make this topic to talk about it.
    Javascript and Java ,they have the same first four letter. Java and Javascript is the two language
    is very popular in the web world.Java is the general-purpose programming language that you can
    create an application or an applet.Javascript is a script language that looks sort of like java;with
    it you can do various nifty things in web pages.They are independent languages ,used for different
    purposes.If you are interesting in creating a website you should learn how to w...
  27. Javascript Events Not Working For Ie - (6)
    I just made this little html file and I used javascript to show which arrows you're pressing. It
    just says the key code, but only for the arrows, so it will say "37, 38, 39, 40" if you're
    pushing all the arrows. When you let go of the arrows, it won't show that value. It works
    perfectly in Firefox, but I can't get it to run in Internet Explorer. The little notification
    bar down in the bottom left of the window says there's an error, and it just sits there. All I
    used was a function for onKeyDown and onKeyUp on the body, and every 10 milliseconds it sh...
  28. Javascript - What's Your Browser? - (3)
    Here is the code that i picked up from a Javascript book that will tell you wether you are using
    Firefox or Internet explorer. obviously the (navigator.appName ==" browser name ") can be changed
    to different browsers. CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 -
    Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml">
    <head> <title>What's your browser?</title> </head>
    <body bgcolor="#FFFFFF"> <h2> <script
    language="...
  29. How Do You Make A Javascript Calculator? - in a form (11)
    Hi, does anyone know how you would make a html form with javascript where it calculates number... i
    will demonstrate below to make it more clear what i mean.. i want the form to have like three
    buttons, MULTIPLY,DIVIDE. AND RESET.. and than i want it to have the fields where you type in the
    numbers and it gives you the answer.. so its Field 1 * OR / Field 2 = Field 3 . does anyone know
    how to make this work? i basiaclly want all the three functions to work with the same form. this is
    a project grade in my web design class but i need help. Thanks...
  30. Opera Browser + Javascript + Embeded Sound - Embeded sound works in IE, but not in Opera (0)
    Hello! Here is the problem. There is an Embed object, created like this: function
    createWMPEmbedMarkup(src, id, baseurl) { // For choice, using the DOM instead of a string
    // so the caller gets a node. (Its childNode could be used if you don't want the whole p
    element) // Then, if markup is needed instead, innerHTML is available. var x =
    document.createElement("embed"); x.setAttribute("FileName", src);
    x.setAttribute("type", "application/x-mplayer2"); x.setAttribute("AutoStart", "0");
    x.setAttribute("id...



Looking for javascript, click, script, script, protect, source, coad

Searching Video's for javascript, click, script, script, protect, source, coad
Javascript
Close Window
Javascript
close window
Auto Run
Java Program
Run Java
program on
double click
Adding Rows
&
Columns In
Html Table
Using
Javascript
Adjusting
Rows/cols Of
Frames In
Frameset
Using
Javascript
Is Not
Working In
Firefox 3 Is
Not Working
Java Vs
Javascript
Java Script
Drop Down
Menu With
Css - a
full code
for a
dynamic drop
down
[help] Java
Script:
Window.open
Works with
Firefox, not
IE
Jsp Or Java
Chat Script
Like Mig33
Document.wri
te &
Noscript
Questions
(javascript)
Javascript
Slideshow
Tutorial How
to make a
slideshow in
JavaScript
Hiding
<div>
Boxes With
Javascript
Javascript
Help #1
Flash And
Javascript
Interaction
swfobject js
questions
One Click
Copy And
Paste To
Clipboard in
simple
Javascript
Capturing
Username Of
Computer
using
javascript,
is it
possible?
Javascript
Object Node
Referencing
Help
Problem With
Java Script
Popup Form
Doesnt work
in Safari
Helpful
Registry
Edit For
Java
Programmers
Command
Prompt on
right click
menu
Simple
Firefox Vs.
Ie Script
Bug; Need A
Little Help
Simple
script works
in Firefox
but not IE.
Is It
Possible To
Create A Web
Based Mmo In
Javascript?
And could
there be
free
movement
without
reloading
the page?
Javascript
Error Error
"missing
) in
parenthetica
l" with
JSON
statment
I'm
Making My
Own
Javascript
Only Rpg :d
earliest
beta perhaps
Web
Applications
: J2ee Or
Javascript/c
ss/html
I`m New To
Javascript.
Special Wii
Javascript
New
Javascript
Objects for
Wii
Lottery
Script Help
What's
The
Relationship
Between
Javascript
And Java are
they the
same or
different
Javascript
Events Not
Working For
Ie
Javascript -
What's
Your
Browser?
How Do You
Make A
Javascript
Calculator?
in a form
Opera
Browser +
Javascript +
Embeded
Sound
Embeded
sound works
in IE, but
not in Opera
advertisement



Javascript : No Right Click Script !@ - This script will allow you to protect your source coad !



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE