Validator with custom submit() function
I have a form with a DIV tag which acts as a Submit button:
- <div onkeydown="ButtonDown('SaveButton')" onkeyup="ButtonUp('SaveButton')" onmousedown="ButtonDown('SaveButton')" onmouseup="ButtonUp('SaveButton')" onmouseout="ButtonUp('SaveButton')" onclick="SubmitForm();" class="Button ButtonRightAligned" id="SaveButton">
<div class="ButtonLeft">
</div><div class="ButtonText">
<a tabindex="87" onclick="return false" href="#">Save and continue</a>
</div><div class="ButtonRight SaveContinue">
</div>
</div>
I can't seem to get the Validator plugin to work with my SubmitForm() function. The validator runs and displays the message but the form still gets submitted...which isn't too useful.
Any suggestions on how to stop the form from being submitted? Here is my custom submit function:
function SubmitForm() {
document.forms['frmShortListCriteria'].submit();
}