jimmythegeek
Programmer
I have an ASP Login page that opens SQL Server and sets a session variable
Session("AdminPassword"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Works fine.
My question is, if I use client side validation to verify the password the user enters, can I NOT refer to the session variable because it is not running at the server? I am currently getting an error "Type Mismatch session"
===============
<Script Language="VBScript">
Sub cmdSubmit_OnClick()
If document.frmLogin.elements("txtPassword"
.value = Session("AdminPassword"
Then
document.location = "admin.asp"
Else
MsgBox "You have entered an incorrect password, please try again.", 64, " Incorrect Password"
document.frmLogin.elements("txtPassword"
.focus
End If
End Sub
</Script>
===============
If I cannot do it this way, is there a way to mix client side script with session variables. I hope I asked the question correctly.
Thanks in advance. Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
Session("AdminPassword"
Works fine.
My question is, if I use client side validation to verify the password the user enters, can I NOT refer to the session variable because it is not running at the server? I am currently getting an error "Type Mismatch session"
===============
<Script Language="VBScript">
Sub cmdSubmit_OnClick()
If document.frmLogin.elements("txtPassword"
document.location = "admin.asp"
Else
MsgBox "You have entered an incorrect password, please try again.", 64, " Incorrect Password"
document.frmLogin.elements("txtPassword"
End If
End Sub
</Script>
===============
If I cannot do it this way, is there a way to mix client side script with session variables. I hope I asked the question correctly.
Thanks in advance. Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?