Javascript changes to Textbox Control
Hi:
I have a javascript that I have attached to the onblur of an asp.net textbox to encrypt passwords. The script runs and when I examine the output of the script the password has been encrypted, however it doesn't seem to be updating the Textbox.Text. Here is my code:
//inVal is control name passed by Me.ClientID() on page load
function hashPass(inVal){
//alert(inVal);
var passVal = inVal.value;
//alert(passVal);
var newPassVal = hex_md5(passVal);
//alert(newPassVal);
inVal = newPassVal;
alert(document.forms[0].Login1_txtPass.Value);
}
Sub Page_Load
If Not IsPostBack() Then
Dim command as String = "return hashpass(" + Me.ClientID() + "_txtPass);"
txtPass.Attributes("onBlur") = command
When I examine the value of the Textbox.Text after postback it has the unecrypted value, what is going on here?
|