wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to Disbale ViewSource and SaveAs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to Disbale ViewSource and SaveAs" Watch "How to Disbale ViewSource and SaveAs" New topic
Author

How to Disbale ViewSource and SaveAs

Mike Jeya
Ranch Hand

Joined: Apr 15, 2004
Posts: 54
I saw some webpage have disabled the "Source" option under the "View" menu item on the menu bar

I already disable the right mouse clicking on my webpage by using JavaScript. I want to know how to disable the view source select from the menu bar as well.
Sandip Sarkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 55
Hey,

I did some google on your issue and what i got to know is quite logical. The server has to send the data to the client and hence will be available in some readable format. You cannot do this through javascript.
As we know, javascript cannot access anything outside the web page. However there may be an ActiveX control that can do it for you. But still that too can be disabled.

Thanks,
Sandip
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It can not be done. If it could be done, do you think Google, Hotmail, Yahoo, etc would let you look at their code?

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Disbale ViewSource and SaveAs
 
Similar Threads
Need code help: Disable view source in browser from menu or right click on the page
enable and disable a menu item in a menu bar
disable view source
How to link JComboBox item with a webpage
Image Blocks a Portion of the Sliding Menu from View