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

Warden, Matt mwarden at odyssey-design.com
Wed Sep 13 22:30:12 CDT 2000


There are a bunch of ways to do this. One of the ideas I've played with is
using JavaScript to load an image like:

var myimg = new Image();
myimg.src = password + ".gif";

and then checking the byte size of the image. If the image does not exist,
it will have no byte size (IE reports it as -1 if you view properties). So,
to change the password, you'd just rename that image. I haven't figured out
how to check the size of the image using the DOM and JS (i've only played
with this idea on the server-side), but hopefully this will get you on the
right path.

--
mattwarden
mattwarden.com

----- Original Message -----
From: Lisa Bartholomew <lisa at koolfish.com>
To: the list <thelist at lists.evolt.org>
Sent: Wednesday, September 13, 2000 10:29 PM
Subject: [thelist] hiding a password in a simple javascript prompt box


> Hi,
> 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
> highlights.
>
> 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.
> </tip>
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list