misterx
06-08-2003, 08:47 AM
I'm having a hard time changing the value of a hidden form element with the onChange event handler. The form pretty much looks like this:
<form action="redirect.php" method="post" name="admin">
<input type="hidden" name="purpose" value="update_users">
<input type="hidden" name="0-id" value="1">
<input type="hidden" name="0-changed_pass">
<input type="text" name="0-user" value="jseay"></td>
<input type="password" name="0-pass" value="passwerd" onChange="document.admin.0-changed_pass.value='changed'">
<input type="checkbox" name="0-u_admin" value="y" checked>
<input type="checkbox" name="0-s_admin" value="y" checked>
<input type="checkbox" name="0-n_admin" value="y" checked>
....
</form>
And when I submit the form, if the 0-pass value has been changed, it doesn't seem to effect the value of the hidden element 0-changed_pass. Any idea why that would be? Thanks.
<form action="redirect.php" method="post" name="admin">
<input type="hidden" name="purpose" value="update_users">
<input type="hidden" name="0-id" value="1">
<input type="hidden" name="0-changed_pass">
<input type="text" name="0-user" value="jseay"></td>
<input type="password" name="0-pass" value="passwerd" onChange="document.admin.0-changed_pass.value='changed'">
<input type="checkbox" name="0-u_admin" value="y" checked>
<input type="checkbox" name="0-s_admin" value="y" checked>
<input type="checkbox" name="0-n_admin" value="y" checked>
....
</form>
And when I submit the form, if the 0-pass value has been changed, it doesn't seem to effect the value of the hidden element 0-changed_pass. Any idea why that would be? Thanks.