You're mixing client side and server side code. Sessions live on the server, while the OnClick will fire in the browser. To do what you want to do, either submit the page to the server and compare there, or send the value of the Session variable to the client, like this:
If (frmAdd.Password.value <> '<%=Session("Password")%>') then
IMO, storing passwords in client side code is not really a good and secure idea, so maybe you're better off posting to the server.....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|