Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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
 
Old November 25th, 2005, 03:17 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hiding script

Hi,
I want to hide my script from view source for all users of my htm page. I can disable the right click option with a javascript function but I cannot disable the source option from the View Menu at top of the Internet Explorer. Is there any fuction or code to do so?

It will be great if anyone can help!!
 
Old November 25th, 2005, 06:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
quote:Originally posted by arnabghosh
 Hi,
I want to hide my script from view source for all users of my htm page.
You can't do that. You can try. You will fail but you will succeed at annoying your visitors. Please don't. :)

http://webtips.dan.info/force.html
http://www.lemurzone.com/edit/converse53.htm
http://www.jamesshuggins.com/h/web1/...ownloading.htm
http://www.sitepoint.com/article/don...le-right-click
http://dorward.me.uk/www/hide/





--
http://yupapa.com
 
Old November 25th, 2005, 07:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I think Joe Fawcett's quote from this thread says it all:
Quote:
quote: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
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: That´s what you are by Marshall Curtley (Track 2 from the album: Nomads 2) What's This?
 
Old November 26th, 2005, 04:45 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> think Joe Fawcett's quote from this thread says it all

Brilliant! ;)

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
 
Old November 28th, 2005, 03:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

But, why do you want to hide the source from visitor ? Instead of trying to hide the HTML in general, you can go for some solutions that cater to your business needs (client requirements).

Do you want to hide some hidden form fields (in which you might have stored some keys / passwords) ? You can employ a server side authentication script to avoid this. Security by hiding something will not work.

Are you trying to prevent data stealing using XMLHTTP ? The best way is to use an HTML encryption software. See the google way of preventing page source being taken using XMLHTTP.

If you really want to block source, Flash + Action script is the solution. Most of the online examination systems have started using Flash. If your requirement is something like this, you can try Flash.





Similar Threads
Thread Thread Starter Forum Replies Last Post
hiding an image Michel Kanbour ASP.NET 2.0 Basics 2 August 20th, 2007 12:07 PM
Hiding scrollbars. rupen HTML Code Clinic 1 September 5th, 2005 07:00 AM
hiding in we config vohra_vikas ADO.NET 2 September 28th, 2004 08:36 AM
Inheritance and Name hiding Ibn_Aziz C# 2 December 25th, 2003 05:14 AM
Call and run CGI script from a PHP script ... how? dbruins BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 10th, 2003 03:09 PM





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