I was wondering if anyone could help. I am using a encryption component. If you press a button on a form the password of the user is decrypted. Now if you see the code:
sqlstr = "SELECT TUTOR_USERNAME, TUTOR_PASSWORD "
sqlStr = sqlStr & "FROM login "
sqlStr = sqlStr & "WHERE TUTOR_USERNAME = 'pung'"
oRS.Open sqlStr, objConn
Set Context = XEncrypt.OpenContext("mycontainer", False)
Set Key = Context.GenerateKeyFromPassword("my password")
Set Blob = XEncrypt.CreateBlob
= Key.DecryptText(Blob) *****
<form name="frmPreviewPassword"> **********
<input type="text" name="txtPassword" value="<%=oRS("TUTOR_PASSWORD")%>">
<input type=text name=txtDecrypt><input type=button onclick=decrypt value=Decrypt>
What I want to do is this, I want to run the function without having to press the button.
So say after the sql query selects the appropiate value, what I want is that value ie the encrypted password to be sent into the function and then the password will be decrypted and can be stored in either a variable or the fuction itself, so say its in a variable I can manipulate it.
If you see on the lines with a star, :
document.frmPreviewPassword refers to the the form called frmPreviewPassword
Hope someone can help me automate the running of this function without have to press the button in the form.
Hope someone can help