I used to have a function call on a regular submit button, but changed it to a image type, but the call does not appear to work anymore.
It just seems to submit right though when it should not.
here is the JS functionCode:<input type="image" name="No Addendum Required" class="Addendum_btn" src="images/buttons/no_addendum_required.png" alt="No Addendum" width="100" height="100" border="0" onClick="return validateNoAddendumRequired()">
Here is the previous button code.Code:function validateNoAddendumRequired() { var ta = frmAddendum.elements["Addendum"]; clearComments(document.frmAddendum.Addendum); if (!ta.value.length) { //alert("You must enter your text or choose No Addendum Required."); return true; } else { return (confirm("You have chosen to enter a comment. This will not become part of the medical record.")); } }
Code:<input name="btnSubmit" type="submit" id="btnSubmit" class="button" value="No Addendum Required" onClick="return validateNoAddendumRequired()">



Reply With Quote

Bookmarks