iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old February 19th, 2006, 02:06 AM   #1
New Member
 

Join Date: Jan 2006
Age: 19
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 renren is on a distinguished road
Exclamation Can somebody give me the code to hide the source code?

Can somebody give me the code to hide the source code?..I want the source code of my website to be invisible to everybody..When somebody right clicks anywhere on the page (except an image) and select View Source (or View Page Source depending on your browser). Or choose VIEW > SOURCE (or Page Source depending on your browser) from the menu bar.. I want no text to be visible on the text editor with the HTML for the page..So, can somebody please give me the right code compatible for all internet browsers such as internet explorer, mozilla firefox, etc.
renren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 19th, 2006, 05:14 AM   #2
Highly Reputable Member
 
benbacardi's Avatar
 

Join Date: Feb 2004
Location: United Kingdom
Age: 21
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 benbacardi will become famous soon enough
Re: Can somebody give me the code to hide the source code?

why dont you google [google]hide source code[/google] ?
benbacardi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 19th, 2006, 11:30 AM   #3
Reputable Member
 
craig's Avatar
 

Join Date: Sep 2005
Location: Preston, UK
Age: 23
Posts: 382
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 craig will become famous soon enough
Re: Can somebody give me the code to hide the source code?

There are many ways to appear to hide the source from a user, but there is always a work around. Don't forget the website gets cached on a users PC, here they will have the file that they can just open with notepad or something to easily see the code. You'd have to host the site on a secure server so that the user cant just click VIEW -> SOURCE.
Javascript will only slightly hinder someone.
What is it you're so keen on protecting?

Craig
craig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 19th, 2006, 10:56 PM   #4
New Member
 

Join Date: Jun 2005
Location: Deerfield Beach, Florida
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 phillyphreak is on a distinguished road
Re: Can somebody give me the code to hide the source code?

Here is some code to prevent right-clicking, but not to hide the code...sorry!

<script language="Javascript">
// Do not remove this header
// Set the message for the alert box
am = "This function is disabled!";
// do not edit below this line
// ===========================
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
</script>
phillyphreak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 20th, 2006, 12:31 PM   #5
Highly Reputable Member
 

Join Date: May 2005
Location: U.K
Age: 22
Posts: 728
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 benbramz will become famous soon enough
Re: Can somebody give me the code to hide the source code?

there is no point in hiding your source code. like saying "i want to build a greenhouse but i dont want anybody to see my plants"

not being derogatory, but, if your in the phase of "hiding" source code im guessing your a begginer. and im sure your code wont be too *hot*

html amongst othger things has to be processed by the browser. so there is NO way to hide it. unless you have a blank page.

Instering un needed javascripts and frames to hide source is a waste of your time - learn not to bother.
benbramz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 22nd, 2006, 12:21 PM   #6
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,133
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
Re: Can somebody give me the code to hide the source code?

Every protection is crackable to those determined.... most are very very easy to circumvent.
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 7th, 2006, 08:11 AM   #7
New Member
 

Join Date: Jan 2006
Location: Leeuwarden, NL
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 AnneJan is on a distinguished road
Post Re: Can somebody give me the code to hide the source code?

There is also a code, not to disable right-click but to disable the menu you get with right click:
HTML Code:
oncontextmenu="return false"
In the <BODY> tag.
If you don't want people to see the source code at all, there are products you can google that helps you protect your page.
Greetz, AnneJan
AnneJan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old March 7th, 2006, 09:27 AM   #8
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,133
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
Re: Can somebody give me the code to hide the source code?

If you host on a secure sever (HTTPS), then some engines will have problems crawling it
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
somebody , give , code , hide , source


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Source Code Library Monie The Café 11 March 10th, 2008 02:09 AM
getting source code of a page mikedikta JavaScript 2 October 14th, 2007 03:39 PM
Source Code Clean-up Wizard jswebdev PHP 3 February 6th, 2006 09:56 PM
Viewing source code?? autumn_whispers2me HTML, XHTML and CSS 4 February 14th, 2005 02:40 PM
need help-source code ayus_82 .NET 1 September 20th, 2004 04:48 AM


Search Engine Optimization by vBSEO 3.2.0 RC8