dzygners' forums
You have never visited, or are not logged in.
Not logged in [Login - Register]

Printable Version | Send to Friend
Subscribe | Add to Favorites
Author Subject: [request] Javascript Password Protect
saxsux
Junior Member






3 Posts
Status: Offline

posted on 11.2.2004 at 13:13 Reply With Quote
[request] Javascript Password Protect

Hi. I'm making an .HTA program, and I need a password script.

I was hoping that when the user first uses the program it asks them what they want thier password to be and writes it to a .TXT file.

Then, the next time the user opens the program it asks them to enter the password, and if the password from they entered doesn't match the one in the .TXT file, it wont let them in.

I'lll put full credit in if you want.

Sorry if this isn't very clear,and thanks in advance.

saxsux

View User's Profile View All Posts By User U2U saxsux
Janny
Moderator






776 Posts
Location . Belfast - Ireland
Status: Offline

posted on 11.2.2004 at 16:27 Reply With Quote
I can only offer you an asp quick solution.


code:
  
<%
dim pass
pass = "realpassword"
password = request.form("password")
%>

<%
if password = pass then
%>

<%
response.redirect("success.asp")
%>

<%
Else
%>

<%
response.redirect("Failed.asp")
%>

<%
end if
%>





= Nothing Worth Saying =
View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Janny
Mark
scripter






1599 Posts
Location . Netherlands
Status: Offline

posted on 11.2.2004 at 17:47 Reply With Quote
How will you be securing that txt file?




| Mark
View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Mark
saxsux
Junior Member






3 Posts
Status: Offline

posted on 11.2.2004 at 20:37 Reply With Quote
quote:
Originally posted by Mark
How will you be securing that txt file?


It might sound stupid, but I don't want to secure the file!

It's just for a friend, who wanted a password to stop his sister getting into the software (long story, don't ask), neither of them are very computer literate, so it doesn't need to be too secure.

View User's Profile View All Posts By User U2U saxsux
Mark
scripter






1599 Posts
Location . Netherlands
Status: Offline

posted on 11.3.2004 at 12:02 Reply With Quote
Hmm. Easy way out: store the passwords in the code itself, no customization, okay, but it'll work.

No idea how to do the other option, never really used HTA's / JScript's possibilities to write to the filesystem. You might try http://www.dhtmlcentral.com/




| Mark
View User's Profile E-Mail User Visit User's Homepage View All Posts By User U2U Mark
saxsux
Junior Member






3 Posts
Status: Offline

posted on 11.3.2004 at 12:29 Reply With Quote
Okay, thanks.
View User's Profile View All Posts By User U2U saxsux
Quick Reply [ Show All Smilies ] Not logged in [Login - Register]



© 2002 - 2005 dzygn.com
Powered by XMB v1.5 Beta :: Blue Moon
Processed in 0.4344871 seconds, 32 queries