p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   disable VIEW SOURCE in MSIE (http://p2p.wrox.com/showthread.php?t=31027)

crmpicco June 30th, 2005 07:11 AM

disable VIEW SOURCE in MSIE
 
Is there a way to disable VIEW SOURCE in MSIE without disabling the entire right click button?

Picco

www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt

joefawcett June 30th, 2005 10:25 AM

This must be the most FA of FAQs. There is no way to prevent the user viewing the HTML source of any page other than not putting on the web in the first place :)

--

Joe (Microsoft MVP - XML)

interrupt July 8th, 2005 08:10 AM

I found a site that does it. Try and look up the page source from right click OR the MSIE menu. Not sure if its something to do with the site being a secure site.....

https:\\www.retaileye.net

cheers

interrupt


crmpicco July 8th, 2005 09:39 AM

<html>
<head>
<title>RETAILEYE - Ordering & fulfilment services for retailers.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="css/style.css">

<script>
function validate_logon() {
  valid = true;
  if (document.logonform.userid.value.length < 4) { alert('Invalid user id, minimum 4 characters'); valid = false };
  if (document.logonform.password.value.length < 1) { alert('Invalid password, no password entered'); valid = false };
  if (valid) { document.logonform.submit(); };
};
</script>

</head>

<body bgcolor="#0099CC" rightmargin="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="document.logonform.userid.focus()">


<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td align="center" valign="top">


  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
   <tr>
    <td>

    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
      <td width="55%" height="206" align="left" valign="top"><img src="images/blobs1.gif" width="151" height="206"></td>
      <td width="45%" height="206" align="right" valign="top"><img src="images/blobs3.gif" width="232" height="206"></td>
     </tr>
     <tr>
     <!--
      <td colspan="2">
      <br>
      <center>

        <h3>We are currently carrying out emergency maintenance work on the Retaileye Service. <br>We are working to complete this as soon as possible. Sorry for the inconvenience.</h3>

      </center>
      </td>
     </tr>
     //-->

     <tr align="center" valign="middle">
      <td colspan="2"><img src="images/blobs5.gif" width="420" height="103"></td>
     </tr>
     <tr>
      <td colspan="2">

      <table border="0" cellpadding="2" cellspacing="0" align="center">
       <form NAME="logonform" METHOD="POST" ACTION="/cgi-bin/cookie.pl">
       <tr>
        <td><b>User ID</td><td><input type=text name="userid" size=20 maxlength=20 class="cell"></td>
       </tr>
       <tr>
        <td><b>Logon Password</td><td><input type=password name="password" size=8 maxlength=8 class="cell"></td>
       </tr>
       <tr>
        <td colspan="2" align="center"><input type="submit" name="button" value="Logon" class="button" onClick="validate_logon()"></td>
       </tr>
       </form>
      </table>

      </td>
     </tr>
     <tr align="center" valign="middle">
      <td colspan="2">
      This site is designed for Microsoft Internet Explorer 5.0 or above and is best viewed at a 1024x768 screen resolution.
      <br><br>

      This website provides access to Retaileye, an electronic goods ordering system with co-ordinated home delivery for retailers.<br>
      If you are interested in becoming a registered user please telephone <b>01527 494949</b> or email: <b>retaileyesales@ntl.com</b>.<br>
      Website: <a href="http://www.retaileye.com">www.retaileye.com</a>.
      </td>
     </tr>
     <tr align="center" valign="bottom">
      <td colspan="2"><img src="images/blobs8.gif" width="523" height="91"></td>
     </tr>
    </table>

    </td>
   </tr>
  </table>

  </td>
 </tr>
</table>


</body>
</html>


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt

voila July 21st, 2005 11:58 AM

Disable right click, disable text select and add a top frame with a frame jammer.

You can't access the body frame's content when you do this.



joefawcett July 22nd, 2005 02:01 AM

Dream on, for the naive user yes, I can always defeat this by temporarily disabling JavaScript in the browser or looking in my browser cache for the source.

--

Joe (Microsoft MVP - XML)

richard.york July 22nd, 2005 08:19 AM

Quote:

quote:
Disable right click, disable text select and add a top frame with a frame jammer.
[rant]
That is one of the most annoying "features" so-called "web designers" (try to) implement. Right up there with unrequested popups and scrolling marquees. Personally, I find pages implementing said features to be amateur and when all is said and done, don't have a lick of content worth "stealing" in the first place. All you are really doing is annoying your users, because 99% of them just want to use the context menu "back" or "refresh" controls, or other helpful UI features provided by the context menu. Do you really think the average user even knows what the "view source" control does? And if the user isn't your average no-technical-know-how web surfer, do you really think they don't know how to open their browser's cache, or disable scripting? It's very unlikely it'll ever serve the purpose you intended it to. If you don't want someone to download your content, don't make a website in the first place! Stunts like this are what cause users to disable scripting, and gives an otherwise very useful language a bad name. This is also, AFAIK, the top reason the oncontextmenu event isn't implemented in Opera (we'll lamment endlessly for those three or four users).
[/rant]

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

joefawcett July 22nd, 2005 04:49 PM

Richard

I couldn't agree more.

And why is it that the people whose code is so revolutionary that it needs hiding are always the ones who don't know how to hide it :)

--

Joe (Microsoft MVP - XML)

surendran August 3rd, 2005 10:27 PM

hello,
i'm also looking disable view source code, please anyone help me,
it's urgent for me, i did one site, http://www.tech-3.co.uk, here you can't right click or select all, but i need to disabled viewsource and select all menu.

surendran
(Anything is Possible)

Imar August 4th, 2005 01:29 AM

Hi surendran,

Did you even read this thread? If so, don't you think the conclusion is it can't be done, but you can only make it a bit harder for some users?

What reason do you have to believe that, after reading this thread, it's still possible??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.


All times are GMT -4. The time now is 09:51 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.