We’re about to switch from one web design to another and I’ve come upon a problem.
We have a form that submits information to a pl file which then sends an email.
On our old form I had this link
<a href=“javascript:submitForm()” title=“Submit”><strong>SUBMIT</strong></a>
which would obviously go through the function submitForm which would validate the user entries first and then if everything was ok, submit the form to the pl file
now, problem is that on the new site someone else has constructed the CSS and some of the pages and he’s put this in the new page
<input type=“submit” value=“Submit” class=“btnsubmit” onclick=“submitForm()” />
which does call the function but if the page isn’t valid it still submits the form…why, cause it’s a submit button thats what it does
Now I know I could replace the button with the link but is there anyway to adjust the button to work more like the link did?
Any helps appreciated