javascript - "Submit is not a function" error in Firefox and works fine in IE -
i getting "submit not function" error in firefox below code. tried document.getelementbyid("editinvnotesform").submit(); , document.forms[0].submit(); etc . using getelementbyid not give error updated value of form not submitted.i appreciate help.
<input type="submit" value='<liferay-ui:message key="btn.save" />' onclick="return validatenotes(this)" onmouseover="this.classname='clsbluebuttonover'" onmouseout="this.classname='clsbluebutton'" class="clsbluebutton" /> </td> <script type="javascript"> function validatenotes(savebutton) { if(document.getelementbyid('notetext${itemnotevo.noteno}').value<=0 ){ alert(liferay.language.get('msg.enter-report-note')); document.getelementbyid('notetext${itemnotevo.noteno}').focus(); return false; } if (document.getelementbyid('notetext${itemnotevo.noteno}').value.search(/[<>]+/) != -1) { alert(liferay.language.get('msg.angle-brackets-not-allowed')); document.getelementbyid('notetext${itemnotevo.noteno}').focus(); return false; } savebutton.disabled=true; savebutton.classname='clsbluebutton'; document.editinvnotesform.submit(); return true; } </script>
Comments
Post a Comment