SHOP PRODUCTS
Houzz Logo Print
webuser_488848

how to make right clicking not work on my website

K/OK
22 years ago

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!

Comments (23)

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    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.

  • JamesS
    22 years ago
    last modified: 9 years ago

    just for your information go to this website and do a search for no right click.

    24Fun script website

    JamesS

  • Related Discussions

    My right-click menus have gone transparent

    Q

    Comments (5)
    When there is some mysterious appearance or disappearance of some feature I have not been tinkering with I often try a very old mainframe trick -- power everything off for several minutes. On rare occasions that old trick still actually works.
    ...See More

    right clicking on picture to email it

    Q

    Comments (3)
    Does your sister have Hotmail as her Default mail program? I couldn't send from or use the "Contact us" until I made a Default mail on my laptop as I was just using webmails as is.
    ...See More

    Netscape lets you right-click even with correct script

    Q

    Comments (4)
    I use it when I'm displaying my artwork and graphics on my websites. Why is everyone always so quick to jump on this subject as if we are stupid for using the code? We are VERY aware that a lot of people know how to get around it. I know how to get around it too. But I still like to use it.
    ...See More

    no right click

    Q

    Comments (10)
    I usually use the no right click script if I am gonna be uploading or posting pictures.., just a habit that I had gotten into.. It has worked on most sites that I have made, and I do use IE... I had the script inside the proper tags, just not sure why it wouldn't work on the trade page.., but I haven't been able to figure out how to get around the bullets list that is built into the script there either, so it isn't any big deal.., also, for what it is worth, the no right click script has nothing to do with saving a page to favorites or stopping/hindering someone from looking at a cached page.. it was created to stop the ability of right clicking on pictures and copying them to your system.. there is also a script that will stop the view source which is used quite frequently as well by "nefarious" ? others if they really want to look at your information.. that really doens't bother me .. really.. all it does is stop people from seeing where you have your files stored. Anyway.. Thanks for the information! And have a great day all! Katbird
    ...See More
  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    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.

  • tim_in_nc
    22 years ago
    last modified: 9 years ago

    I don't know if this will help or not.

    Here is a link that might be useful: HTML No Right Click Code

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    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.

  • Htrose
    22 years ago
    last modified: 9 years ago

    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.
    :-)

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    I would have to see the code hidden...have a link to check out?

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    Whoops missed a comment, what about screen captures for images?

  • Htrose
    22 years ago
    last modified: 9 years ago

    Dale,
    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.

  • Htrose
    22 years ago
    last modified: 9 years ago

    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.

    1. Create precise slices from selections.
      Select an element using any of the ImageReady selection tools, such as the magic wand. Choose Slices > Create Slice from Selection. Repeat this process to create additional slices from small image elements. If necessary, you can manually resize these slices for greater accuracy. Although slices are always rectangular, precise slice creation is very useful with small or unusually shaped graphic elements.
    2. Create a No Image slice.
      In addition to image slices, you can also create "empty" slices (called No Image slices) that can contain text, a background color, or function as place holders. To create a No Image slice, select a slice and choose No Image from the Type pop-up menu in the Slice palette. You can also add a background or text.
      5. Name the slices.
      With the slice select tool, click the slice you want to rename. In the Slice palette, select the current slice name and replace it with a descriptive one. Renaming slices allows you to give them more descriptive names, making them easier to identify and work with. For a slice that will contain a link, enter the destination (such as http://www.adobe.com) in the URL field of the Slice tab. This makes the entire slice a hyperlink to the specified URL.
      6. Set the optimization settings for each slice.
      For each slice, set the desired optimization settings using the Optimize palette, then save the original Photoshop.psd file. You can use JPEG compression on slices containing photographs and GIF compression on other slices in the image. Adobe ImageReady lets you mix and match optimization in any way you want. Save the file when you're done.
      7. Place the sliced image on a Web page as a Smart Photoshop object.
      After you have prepared your image in ImageReady, start Adobe GoLive and create a site. Drag the Smart Photoshop object icon from the Smart tab of the Objects palette onto your site. In the Live Image Inspector set the Source of the Smart Photoshop object to the sliced image file. When prompted, choose a location to save the slice image data. GoLive automatically creates and names a data folder that contains the slices for you.
      8. Use the Update button to refresh your site window.
      Click the Update button in the Site toolbar to refresh your site so you can see the sliced data folder in the site file. You can also check the link by opening the In and Out Links palette.
    3. Replace text in the No Image slice.
      Choose the No Image slice and replace the text or insert a graphic. Preview the page in your browser and check out the page and its various elements to see if they work as intended. If you want to make any changes, slices can be updated directly in Adobe GoLive.
      Creating an entire Web page from a sliced image can be a fast and easy way to design a page on the fly.
  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    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.

  • Htrose
    22 years ago
    last modified: 9 years ago

    Hi Dale,

    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.

    Your comment:
    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.

    My statement:
    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.

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    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 :)

  • ArtsyCraftsy
    22 years ago
    last modified: 9 years ago

    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?

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    Did you view source from the top tool bar or right clicking on the page and selecting view source?

  • notmyaddy_htmail_com
    22 years ago
    last modified: 9 years ago

    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.

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    Yep exactly, their will also be a backup in peoples cache. :)

  • k_wakefield_nohotspammail_com
    22 years ago
    last modified: 9 years ago

    Dale- I can't remember but I think it was the toolbar. Isn't it the same on right-click?
    Karen

  • janda_stargate_net
    22 years ago
    last modified: 9 years ago

    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.):

    script language=java-scriptgt;
    [!--
    /*
    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) "
    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;
    // --]
    [/script

  • janda_stargate_net
    22 years ago
    last modified: 9 years ago

    I answered my own question after searching for help on Angelfire...I found a different code that DOES work! And it's shorter!!

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    Can you post a link to your site

  • typhane777_excite_com
    22 years ago
    last modified: 9 years ago

    HTH

    -tiffany

  • montroze_hotmail_com
    22 years ago
    last modified: 9 years ago

    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.

    (head)
    (title)Untitled(/title)

    (LINK TYPE="text/css" HREF="/mywebtutor2/css/mwtstylesheet.css" REL=stylesheet
    TITLE="mwtstylesheet")

    (script language="Java Script")(!--

    function click1(fileName1) (
    parent.mainFrame.location.href = fileName1;
    ) //--)(/script)

    (style type="text/css")
    (!--

    .blank (background-color:000080;)
    .second1 (background-color:ff9900;)
    .second2 (background-color:cd0000;)
    .second3 (background-color:79cdcd;)
    .second4 (background-color:ff6347;)
    .second5 (background-color:9acd32;)
    .second6 (background-color:9932cc;)

    a.menusecond:link (color:#ffffff;)
    a.menusecond:visited (color:#ffffff;)
    a.menusecond:hover (color:#ffffff;)
    a.menusecond:active (color:#ffffff;)
    --)
    (/style)

    This one was rather easy.

Sponsored
NME Builders LLC
Average rating: 5 out of 5 stars2 Reviews
Industry Leading General Contractors in Franklin County, OH