I have a form that has many text fields and if I add in a simple submit button, if the enter key is pressed while in a field it will submit the form. This I do not want. Instead I want to use onclick to call a javascript function that will submit when clicked only, the enter key does nothing.
I found this script but it does not work:
javascript:
<script language="JavaScript">
function submitform(form)
{
document.myform.submit();
}
</script>
myform is the name of the form.
then for the button I have this:
<input type="button" onClick="return submitform()" name="submit" value="Send">
I need for this to work in both IE and Firefox. I just cannot seem to get it to work.
I found this script but it does not work:
javascript:
<script language="JavaScript">
function submitform(form)
{
document.myform.submit();
}
</script>
myform is the name of the form.
then for the button I have this:
<input type="button" onClick="return submitform()" name="submit" value="Send">
I need for this to work in both IE and Firefox. I just cannot seem to get it to work.