If you say that the security isn't a very important
issue, it's simple. Even the security would be
important it should bee not very difficult, but the
authentification should be made on the server.
Assume that exist a text box named txtUserID and a
text box named txtPswd:
UserID<input type="text" name="txtUserID">
Password<input type="password" name="txtPswd">
<input type="button" value="Sign"
onclick="Sign(document.all.txtUserID,document.all.txtPswd)">
<script language="JavaScript">
function Sign(username,password)
{
if(username != "YourUseName" && password !
"YourPassword")
{
alert("Access denied! Invalid user name or
password!");
}
else
{
alert("Access allowed!");//other actions oyu want
to do
}
}
</script>
Any way this function is not good because the any
user can see the function. You should read the user
name and password from a file or shoul authentify on
the server. Good Luck!
--- Larry Hieb <admin@n...> wrote:
> I am looking for a pretty simple password login
> script. I'm not to
> concerned with anyone cracking it, so security isn't
> a very important
> issue due to the nature of the site information, but
> I do want the users
> to login with the Username ID and Password I supply
> them.
>
> The only two requirements I would like to see are as
> follows:
>
> 1. A text box where the user can type in their
> Username ID: this can be
> visible as it is being typed in
>
> 2. A text box where the user types in their
> Password: this must show up
> as astricks as they type it in.
>
> Anyone have a script like this or can point me to
> where I can cut and
> paste one I would appreciate it.
>
> Thx
> LH