Copy link to clipboard
Copied
I am using the Dreamweaver Update Record Wizard to update my database records. Basically, Dreamwevar creates for you an update form and then writes it to the database when you click the submit button on the form.
I edited the update form to include onsubmit="return MyValidateFields(this);" to validate my fields before writing them to the database. MyValidateFields() is just a JavaScript function I wrote to validate fields such as password, username, etc. This method works very well with the Insert Record behavior, but I am not getting it to work with the Update Record Behavior. It looks as though when the submit button is clicked the MyValidateFields function is not even invoked. Am I doing something wrong, or is it because this onsubmit feature can not be used with the Update Record behavior? Any ideas?
Copy link to clipboard
Copied
Your form validation will not work for anyone that has javascript disabled.
Copy link to clipboard
Copied
Thanks for the answer. What method then (other than JavaScript validation) which will never be disabled can I use?
Also do you have an answer to my first question? Thanks.
Copy link to clipboard
Copied
You should use server side validation such as php, asp, coldfusion, etc. where the data is validated on the server side. You can combine js and server side validation so users with js enabled will validate the form on client side without page reload and server side validation is used if javascript is disabled.
On regard to your first question I can't see your code so I can't speculate as to what your issue is besides the speculations you've already presented.
Copy link to clipboard
Copied
Thanks again for the reply. My site's functionality is all implemented alread. All I have left to do is to complete the form validation.
But I seem to be stuck with the validation stuff. I am new at php coding, and I guess for now I will need to find some php based routines so I can do my validation on the server side. I basically need to validate username, passsword and email. Do you know of any public php code implementing this stuff?
Copy link to clipboard
Copied
I am closing this as the problem has disaapeared.