Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No right click code

    Hello there,
    I designed my site at www.officelive.com, and I'm having a heck of a time getting a "no right click" code installed. There's really no access to the site's HTML except for viewing the source code. Even when I simply copy the site's code and paste it back in an HTML module, it's all messed up.
    Can I have you take a look at a little sample site I did and see what you can do? Worse comes to worse, I can always put my site with a different host where I can use the no right click code. Please email me.
    L J

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,737
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    Hello classy,
    Very hard to tell what's not working without seeing your code. The link you gave us is just an MS site.
    The validator can help you find mistakes. See the links about validating in my sig below. Maybe you can fix it on your own that way.

    Otherwise, give us a good link or quote your code here.
    Please use the code tags, [code][/code] - available with the # button in the post edit window.
    This will wrap your code in a scroll box which greatly helps the readability of your post.

    You know, right click scripts are just annoying... what are you trying to protect that's worth disabling the end viewers mouse? (right click has several options)
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,387
    Thanks
    32
    Thanked 288 Times in 282 Posts
    Quote Originally Posted by classy View Post
    I'm having a heck of a time getting a "no right click" code installed.
    As Excavator alluded to, such scripts are both pointless and annoying.

    Assuming that you were to get such a script working (for some reason I don't think they work in Firefox, but I could be mistaken), I could just go to "Tools" > "Page Info" in Firefox to get a list of all of your "Media" (e.g., images) with a nifty "Save As" button while Ctrl+U or "Edit" > "View Page Source" will get me your source code.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by classy View Post
    Hello there,
    I designed my site at www.officelive.com, and I'm having a heck of a time getting a "no right click" code installed.
    Forget about it. There is no absolute nor reasonable way to prevent a user from copying something from a web page. You are just wasting your time and in the end you will annoy the users.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New Coder
    Join Date
    Dec 2009
    Posts
    84
    Thanks
    6
    Thanked 3 Times in 3 Posts
    @ classy

    If your html code very privy and you don't like the visitors can spy your code you can buy the html lock or html guard

    the professional code locker usually can safe both your html code or image from save as, download or viewer

    but if you just wanted for locking your html code, give to me. i will en script your html, js or php code all totally free

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by sir.jones View Post
    @ classy

    If your html code very privy and you don't like the visitors can spy your code you can buy the html lock or html guard

    the professional code locker usually can safe both your html code or image from save as, download or viewer

    but if you just wanted for locking your html code, give to me. i will en script your html, js or php code all totally free
    Sighs...Nothing can prevent people from viewing your html or decrypting whatever you are trying to use. Don't waste your time.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New Coder
    Join Date
    Dec 2009
    Posts
    84
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by classy View Post
    "no right click"
    Because you just wanted how to prevent "no right click" i give a handy js code to you..
    put this to your code <body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
    but it not will work if some one disable javascript from browser option panel

    i repeat again, many years a go i found a site then i tried to right clink, save as(save page as), view page source, all failed then i know the webmaster using html lock code (or kind of it)
    aks it to uncle google..

  • #8
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by sir.jones View Post
    @ classy

    If your html code very privy and you don't like the visitors can spy your code you can buy the html lock or html guard

    the professional code locker usually can safe both your html code or image from save as, download or viewer

    but if you just wanted for locking your html code, give to me. i will en script your html, js or php code all totally free
    Nuts.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #9
    New Coder
    Join Date
    Dec 2009
    Posts
    84
    Thanks
    6
    Thanked 3 Times in 3 Posts
    @ All
    i give sample kit
    save this code as .html / .htm and open it in your browser then let me know what you see. until you don't decode i think it not named as html code
    Code:
    <script>
    <!--
    document.write(unescape("%3Chtml%3E%0A%3Cscript%20language%
    
    3DJavascript%20defer%3E%0Afunction%20showPreview%28%29%0A%7B%0A%
    
    0Avar%20values%3DdialogArguments.split%28%22%3B%22%29%
    
    0Ad1.innerHTML%3Dvalues%5B0%5D%3B%0Ad2.innerHTML%3Dvalues%5B1%5D%
    
    3B%0A%7D%0A%3C/script%3E%0A%0A%3Cbody%20onload%3D%22showPreview%28%
    
    29%3B%22%3E%0A%3Ctable%20cellpadding%3D%225%22%20aling%3D%22center%
    
    22%3E%0A%3Ctr%3E%0A%3Ctd%20colspan%3D%223%22%20aling%3D%22center%
    
    22%3E%3Cb%3EData%20Preview%3C/b%3E%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%
    
    0A%3Ctd%20width%3D%22100%22%3E%26nbsp%3B%3C/td%3E%0A%3Ctd%3EName%
    
    3C/td%3E%0A%3Ctd%3E%3Cdiv%20id%3Dd1%3E%3C/div%3E%3C/td%3E%0A%3C/tr%
    
    3E%0A%3Ctr%3E%0A%3Ctd%20width%3D%22100%22%3E%26nbsp%3B%3C/td%3E%0A%
    
    3Ctd%3EPravin%3C/td%3E%0A%3Ctd%3E%3Cdiv%20id%3Dd2%3E%3C/div%3E%
    
    3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20width%3D%22100%22%3E%
    
    26nbsp%3B%3C/td%3E%0A%3Ctd%3E%3Cinput%20type%3D%22button%22%
    
    20onclick%3D%22returnValue%3Dtrue%3Bwindow.close%28%29%3B%22%
    
    20value%3D%22%20OK%20%22%3E%3C/td%3E%0A%3Ctd%3E%3Cinput%20type%3D%
    
    22button%22%20onclick%3D%22returnValue%3Dfalse%3Bwindow.close%28%
    
    29%3B%22%20value%3D%22%20Cancel%20%22%3E%3C/td%3E%0A%3C/tr%3E%0A%
    
    3C/table%3E%0A%3C/body%3E%0A%3C/html%3E"));
    //-->
    </script>

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by sir.jones
    @ All
    i give sample kit
    save this code as .html / .htm and open it in your browser then let me know what you see. until you don't decode i think it not named as html code
    All that code did was escape the characters in the html and then used javascript set the innerHTML of some element to the escaped code. It won't work with javascript disabled. FYI here is your "encrypted" html.

    Code:
    <html>
    <script language="Javascript" defer>
    function showPreview()
    {
    
    var values=dialogArguments.split(";");
    
    Ad1.innerHTML=values[0];
    d2.innerHTML=values[1];
    
    }
    </script>
    <body onload="showPreview()">
    <table cellpadding="5" aling="center">
    	<tr>
    		<td colspan="3" aling="center"><b>Data Preview</b></td>
    	</tr>
    	<tr>
    		<td width="100">&nbsp;</td>
    		<td>Name</td>
    		<td><div id=d1></div></td>
    	</tr>
    	<tr>
    		<td width="100">&nbsp;</td>
    		<td>Pravin</td>
    		<td><div id=d2></div></td>
    	</tr>
    	<tr>
    		<td width="100">&nbsp;</td>
    		<td><input type="button" onclick="returnValue=true;window.close();" value=" OK "></td>
    		<td><input type="button" onclick="returnValue=false;window.close()" value=" Cancel "></td>
    	</tr>
    </table>
    </body>
    </html>
    The information in this thread is a good read.

    http://www.codingforums.com/showthre...173#post182173

    Just stop posting useless stuff.
    Last edited by _Aerospace_Eng_; 01-05-2010 at 08:50 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #11
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by sir.jones View Post
    @ All
    i give sample kit
    save this code as .html / .htm and open it in your browser then let me know what you see. until you don't decode i think it not named as html code
    Gee... I have no other comment except that from time to time some think they have discovered the Perpetuum Mobile.
    Last edited by Kor; 01-05-2010 at 09:11 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #12
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,460
    Thanks
    11
    Thanked 600 Times in 580 Posts
    use flash instead of HTML; you can't view its source!
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%

  • #13
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Or just keep it securely inside your HD or flash drive, so that no one can access it
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #14
    New Coder
    Join Date
    Dec 2009
    Posts
    84
    Thanks
    6
    Thanked 3 Times in 3 Posts
    @ _Aerospace_Eng_
    The information in this thread is a good read.

    http://www.codingforums.com/showthre...173#post182173

    Just stop posting useless stuff.
    Sorry if i miss something, i just response depend on discussion flow

    @ rnd me
    use flash instead of HTML; you can't view its source!
    someone sometimes use flash and java class to avoid viewer source, but i don't think so, we still can view what inside both flash or java class in a minute

    @ abduraooft
    Geek... but i think classy just wanted how to prevent his/her property


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •