[thelist] hiding a password in a simple javascript prompt box

Lisa Bartholomew lisa at koolfish.com
Wed Sep 13 21:44:59 CDT 2000

I have a client who wants part of his site password protected. There is
nothing confidential in that area, it is just a monthly report about his
ideas for the market etc. He only wants it protected so that an ex-employee
can not steal his ideas and regurgitate them to other clients. There will
only be one password for everyone which he will email to his clients every
month. He won't spend money on anything so it is to be as simple as
possible. Most clients and especially the ex-employee do not even know that
view source exists.

So I have set up a very simple javascript that prompts the user for the
password. If you go to view source you can however can find out what the
password is. What I would like to know is is there any way that it can be
hidden from view or not?
Can be seen at http://www.lawtonasia.com/test go to monthly investment

Thanks Lisa.

<tip type= simple javascript for total beginners>
To stop a browser jumping to the top of the page when you click on a null
link replace the default pound sign "#" with the following:

javascript:void (0)

I have found this useful for personal homepages that have a lot of thumbnail
photographs that need to be opened in a new window.

More information about the thelist mailing list