Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 30th, 2005, 07:11 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default 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
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
  #2 (permalink)  
Old June 30th, 2005, 10:25 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
  #3 (permalink)  
Old July 8th, 2005, 08:10 AM
Friend of Wrox
 
Join Date: May 2004
Location: , , .
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #4 (permalink)  
Old July 8th, 2005, 09:39 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

<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
  #5 (permalink)  
Old July 21st, 2005, 11:58 AM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


  #6 (permalink)  
Old July 22nd, 2005, 02:01 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
  #7 (permalink)  
Old July 22nd, 2005, 08:19 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

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
  #8 (permalink)  
Old July 22nd, 2005, 04:49 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
  #9 (permalink)  
Old August 3rd, 2005, 10:27 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

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)
  #10 (permalink)  
Old August 4th, 2005, 01:29 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I disable View Source command in web browsers? surendran HTML Code Clinic 15 February 23rd, 2008 05:41 AM
Disable View>Source (disable html source) kazmughal44 HTML Code Clinic 11 December 11th, 2007 11:53 AM
HTML - no View Source GreenLamar HTML Code Clinic 1 August 9th, 2007 03:19 PM
disable the back button of my MSIE Browser. Magen Classic ASP Basics 2 January 24th, 2007 04:49 PM
Disable - View Source in Menu Bar VikramMullick Javascript 1 March 22nd, 2006 05:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.