Say I have a form with a few textFields and a submit button.
What would be the best way, once the user clicks this button, for javascript to validate the textFields ( at least, make sure there’s something in there ) and, if not, pop out a message, if everything OK, the submit the form and php will take over.
Thanks!
add an
OnClick="function_name();"in the html of your submit button,and in the declaration of the function do this