I'd like to disable right clicking on my website. What do I need to do to do this. I don't know HTML; I create my pages with software. Thank you so much!
You cant, No - No Right Click scripts will work, they are all very easy to get around...even the no left&no right scripts are too easy to get around, you cant hide or protect anything thats on your page and that would include source code and graphics. You might think some sites do it but you just have to know how to bypass it, which probably over 95% of surfers can do.
just for your information go to this website and do a search for no right click.
24Fun script website
Here also is some info on the subject,
How do I hide my source?
You can't. The HTML source is necessary for the browser to display your document; you must send the complete, unencrypted source to the browser. Even if a particular browser doesn't have a View Source feature, there are many that do, and someone can always retrieve the document by hand (using telnet) or from the browser's cache.
There are tricks that make it more difficult for some readers to view or save your source (e.g., tricking newbies into thinking there's nothing there by adding dozens of blank lines to the beginning of the document, or using Java Script to trap right-button mouse events). However, just as with tricks that try to protect images from being saved, these tricks have very limited effectiveness.
How do I prevent people from saving my images?
You can't. The image file is necessary for the browser to display your document; you must send it to the browser. Even if a particular browser doesn't have a "Save Image" feature, there are many that do, and someone can always retrieve the image file by hand (using telnet) or from the browser's cache.
There are tricks that make it more difficult for some readers to save your images. However, just as with tricks that try to hide HTML s ource, these tricks can't really prevent thieves from saving your images.
Sorry but thats the dirty info.
I don't know if this will help or not.
Here is a link that might be useful: HTML No Right Click Code
That was less work then the disable left&right click scripts, in a lot of cases if a person wants to see how a certian feature on a page works they grab the source and see how its done...and in alot of cases you can see that that part of the source code is from another person who asks that his name etc. is left in the coding. You can add any number of warnings but that will do very little in most cases unfortunately.
You can't hide HTML, but you can hide your code if you program in asp and run it server side rather than client side.
You can also make it more difficult for someone to lift your images by using a program like Photoshop and slicing them up into pieces, then reassembling them in a table.
I would have to see the code hidden...have a link to check out?
Whoops missed a comment, what about screen captures for images?
Check out the bottom of this page (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvid/html/msdn_viscript.asp) for a comparision between the asp source code, and the page that is delivered to the client (browser) from the server after the code is run.
An Active Server Page (ASP) is an HTML page that includes one or more scripts (small embedded programs) that are processed on a Microsoft Web server before the page is sent to the user. An ASP is somewhat similar to a server-side include or a common gateway interface (CGI) application in that all involve programs that run on the server, usually tailoring a page for the user. Typically, the script in the Web page at the server uses input received as the result of the user's request for the page to access data from a database and then builds or customizes the page on the fly before sending it to the requestor.
ASP is a feature of the Microsoft Internet Information Server (IIS), but, since the server-side script is just building a regular HTML page, it can be delivered to almost any browser. You can create an ASP file by including a script written in VBScript or JScript in an HTML file or by using ActiveX Data Objects (ADOs) program statements in the HTML file. You name the HTML file with the ".asp" file suffix. Microsoft recommends the use of the server-side ASP rather than a client-side script, where there is actually a choice, because the server-side script will result in an easily displayable HTML page. Client-side scripts (for example, with Java Script) may not work as intended on older browsers.
I only have a few minutes right now so I'll get you the info on slicing images later.
Ok, this is directly from Adobe's website.
Sliced images can be used in many ways and you can even create an entire Web page by slicing up a single large image you've already created in Photoshop 6.0. In AdobeÂ® ImageReadyÂ® 3.0 (which ships with Photoshop 6.0), you can divide the image into separate slices. Use the slices as navigation links, triggers for rollover effects, or as placeholders to display other images. You then place the image on a page in Adobe GoLiveÂ as a Smart Photoshop object. Follow these steps to slice your image and use it as a Web page.
1. Open your image in ImageReady.
In ImageReady, decide how you want to divide your image to create a Web page. Typical divisions that you might find on a Web page include navigation bars, banner areas, buttons, and a main image or information area. Start with larger logical divisions, and then create smaller slices around individual elements, such as buttons. You may find using guides helpful in planning how to divide up the images into slices.
2. Divide the image into slices.
Select the slice tool. Drag across a portion of your image to create a slice. Note that the image has now been divided into multiple slices (the user-slice you just created, plus additional auto-slices to fill the rest of the image). Continue to drag across sections of the image to create additional slices. You may find using the Snap to Guides and Snap to Slices commands useful as you divide the image into slices.
Note that user-slices can be selected and resized using the slice select tool. To resize a slice, click the slice with the slice select tool, and drag one of the handles.
Here's some feedback,
But most people who want to hide their "source code" are trying to hide the HTML itself.
: You can also make it more difficult for someone to lift your images by using a program like Photoshop and slicing them up into pieces, then reassembling them in a table.
Sure. But you can't stop them from saving and reassembling the pieces, or from taking a screen dump of the reassembled image in the browser window.
: Client-side scripts (for example, with Java Script) may not work as intended on older browsers.
And they won't work at all on newer browsers with Java Script disabled/unsupported.
I know I am going to probably come across sounding like I'm trying to be a know-it-all or a smart butt, but I am not and that is not how I mean to come across, so please forgive me if I do. The written word can often be misinterpreted. I just merely wanted to point out that there are other options, since you expressed concern for protecting your code, and the original poster expressed concern for protecting his/her images.
My response was to your comment which said:
..you cant hide or protect anything thats on your page and that would include source code and graphics.
Well, that isn't an accurate statement, which is why I posted my response. While server-side scripting or asp isn't appropriate for every application, the conglomeration of web technologies out there does give other options than just HTML, some of which are secure.
Also, if you are building your site/page with a generator such as FrontPage, DreamWeaver, etc., (the orginal poster indicated that he/she doesn't know HTML), whose "code" are you trying to protect, since the editor creates the HTML, not the page's author? Sure, if someone knows HTML, they can tweak it here and there, but the main reason these types of tools are used is:
a)to save time by letting the software do the work, or
b)someone doesn't know HTML or other web languages.
Since the HTML is written by the editor, not the page's author, why would someone care about viewing or "stealing" the source? I guess I am just a purist because I don't consider HTML code. It is a markup language, not a programming language. All it does is format stuff.
And they won't work at all on newer browsers with Java Script disabled/unsupported
Browsers are free, and it is up to the user which one they select to use. However, their choice may limit what they can see and do on the web. While some web developers target audience is such that they program strictly for usability and the lowest common denominator in browsers, others develop for an audience that wants a rich experience with lots of interactivity and cool stuff. Some develop sites for both audiences. Both approaches have their purpose, it just depends on who you are developing for.
I guess if someone is going to disable applets (which does protect your code), scripting (client-side) and active X (also secure), or if they chose not to download and install plug-ins such as Flash or Shockwave (which can be pretty secure for images/artwork), then their browsing experience will not be very rich. That's their choice. I would hate to think that everyone programmed for this type of visitor, because I would find the web pretty boring.
Even if you build in pure HTML, there are no guarantees that certain browsers will interpret all of it very well either. For example, Netscape chokes on nested tables and doesn't recognize certain tags that IE does. Colors can display differently from one browser to another. Some generators, like FrontPage, write a lot of extraneous junk HTML as well as proprietary HTML that other browsers just don't interpret.
I guess my point is, if you wish to protect as much of your code as possible, then you need to explore the use of other technologies. If your visitors are such that you can't use anything other than HTML or client-side scripting, then having your source available for anyone to view is the cost of developing in that manner.
You can also make it more difficult for someone to lift your images...
Notice I said more difficult, not impossible. The average surfer probably isn't going to bother with reassembling a 72 dpi image. In all probability, the average surfer likely wouldn't even know how to go about reassembling it. Sort of like the theory that if you have an alarm system on your house, it may not make it burglar proof, but the average crook will pass it up and move on to an easier target. Unless of course there is something inside that they really want, which in those cases, nothing is going to stop them. You can also explore Flash and Shockwave, which can protect your images. Yes, there is an investment involved, but I guess it comes down to how valuable your images/artwork is, and if they are worth protecting them as best you can, or not. Again, it's a choice.
Just my 2 cents worth on the subject. I don't wish to start a flame war with you, just voice my opinion.
I don't wish to start a flame war with you, just voice my opinion.
Me neither, some good points and a few little differances but I think others reading these will get the point(s)Def. Flash is secure as for other sliced and diced pic's, you are right no one would want to try and assemble one, they could just send a Bot to the site :)
I have been to some site, darn if I remember where, but the view>source option was grayed out so you could not open the code. How is that done?
Did you view source from the top tool bar or right clicking on the page and selecting view source?
Try this when you find a site that has r click disabled.. File, save as, save as type- webpage complete. Everything on the page is saved. If they want the graphics, they'll get them.
Yep exactly, their will also be a backup in peoples cache. :)
Dale- I can't remember but I think it was the toolbar. Isn't it the same on right-click?
Okay, I know that it's easy to get around the disable-right-click code, because I've done it myself. However, I'd still like to know if this code I'm using is correct, because I put it into my sites, logged off, emptied all cookies and temporary files and history, and so far it doesn't work.
This is the code that was given to me from a friend, and I used copy/paste so I know I didn't forget any part of the code (of course this is all enclosed by and >, with "" instead of "[" or "]". Is this the right code to use? I put it after the "body" code.):
Disable right mouse click Script (By Crash @ http://walk.to/crash)
Submitted to and permission granted to Dynamicdrive.com to feature script in it's archive
For full source code to this script and 100's more, visit http://dynamicdrive.com
var message="Amy L. Howe";
function click(e) "
if (document.all) "
if (event.button == 2) "
if (document.layers) "
if (e.which == 3) "
] if (document.layers) "
I answered my own question after searching for help on Angelfire...I found a different code that DOES work! And it's shorter!!
Can you post a link to your site
Well here's his code from the first page for his links at the top..wont post it all...take up too much space, as well the londistance and other pic could be grabbed in 2 seconds.
(LINK TYPE="text/css" HREF="/mywebtutor2/css/mwtstylesheet.css" REL=stylesheet
(script language="Java Script")(!--
function click1(fileName1) (
parent.mainFrame.location.href = fileName1;
This one was rather easy.