I have a contact form on a web site with a submit button. The fields are validated by a js file that returns true if no errors or false if errors to the form. If no errors, I need to call an asp file which will just create and send an email that contains the info from the contact form. Otherwise, the asp file should not be called.
What happens is that the asp file is called whether there are errors or not on the form and the email is sent. I know that the js validation is working correctly and so is the asp. The problem is I need a conditional in the xhtml form. I tried onsubmit but that did not seem to do anything. I can post a few lines of code if the problem is not evident. I have seen many samples but nothing regarding this particular situation.
Thanks
What happens is that the asp file is called whether there are errors or not on the form and the email is sent. I know that the js validation is working correctly and so is the asp. The problem is I need a conditional in the xhtml form. I tried onsubmit but that did not seem to do anything. I can post a few lines of code if the problem is not evident. I have seen many samples but nothing regarding this particular situation.
Thanks