View Single Post
Old 08-15-2003, 12:14 AM   PM User | #47
benastan
New Coder

 
Join Date: Feb 2003
Location: Maryland
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
benastan is an unknown quantity at this point
cool!

very cool idea, the whole client side password protection thing-- personally ill stick with server side, but for using javascript thats amazing. the only other script ive see that would do that is one that encoded the passwords.

anyway, just a few things anyone who has that might want to try:

1. Try using cookies. Have it check the cookie, and if either the cookie doesnt exist, have it send them off some where in the internet, or have 1000000000000 windows pop up, or just send them to the bad password page.

when it sends you to whatever the user's script(ie, BenastanFool.js), have this at the beginning:

var username = "Benastan"
var password = "Fool"
expiredate = new Date
expiredate.setMonth(expiredate.getMonth()+6)
document.cookie = "username="+username+"; expires="+expiredate.toGMTString()
document.cookie = "password="+username+"; expires="+expiredate.toGMTString()

this way, you can access the username and password for the user in virtually any programming language!!!

2. i can see that you obviously just threw this together, so im just gonna recommend a little style thing for anyone who will use it:

change the html for the sign in page to:

<html>
<head>
<title>Sign In</title>
</head>
<body>
<table style="border: 1px solid black;">
<form name="form1" method="post" action="">
<tr><td colspan=2>Sign In:<font style="font-size: 10px;">Enter your username and password to sign in</font>
<tr><td>Username: <td><input name="Login" type="text" id="Login">
<tr><td>Password: <td><input name="Password" type="password" id="Password">
<tr><Td colspan=2><center><input type="submit" name="Button" value="Sign In"

onclick="self.location='chkpwd.htm?'+document.form1.Login.value+document.form1.Password.value"></center>
</form>
</body>
</html>

i forgot what else i was gonna say, oops... oh well, if you object to my new formatting for it, tell me, ill only be sad for a bit , if you actually read this entry, thank you for reading it!
__________________
me...
benastan is offline   Reply With Quote