Forum Moderators: open
Example Update Staff Detail, when update staff email, the person update the email field will have the option, to update with an email address or update record without email address.
So how should i write in my javascript?
Using ASP Classic, javascript and class
language using: VB with ASP classic
My Data retrieve from recordset
<snip>
Thanks in advance.
[edited by: marcel at 8:28 am (utc) on July 30, 2009]
[edit reason] Removed excessive code dump [/edit]
One option for this is the add a checkbox by the email TextBox. If this is checked, update the email in the database, otherwise ignore it.
<input type="checkbox" name="chkUpdateEmail" value="1" /> Update email address
And when saving the form values to the database, first check to see if the CheckBox has been checked:
If Request.Form("chkUpdateEmail") = 1 Then
' Update the email address
End If
So, how to check, because i have a textbox for the email field, so how to show the textbox when i click on the check with Email?
I think I would use javascript [webmasterworld.com] for this, you can hide or show the TextBox on the checkbox click. But, I would also recommend doing a server side check also before saving to the database