I'm having some problems with my form. IE refuses to allow the use of the Enter key to submit the form, returning with 5 beeps everytime I try to submit the form with the Enter key. As far as I can tell, the onsubmit() call is not triggered at all when the Enter key is pressed.
However, if the focus was to go to the Submit button and return back to any of the textboxes without submitting the form, the Enter key would work. The interesting thing is, Mozilla 1.7.2 works like a charm. Pressing Enter submits the form instantly. The Javascript Console didn't display any errors at all. (Unfortunately, due to reasons, I'm catering strictly to IE.)
I'm guessing it has something to do with the way my form is made up of. So a brief description of my page is in order.
The page comprises of top portions. The top portion contains links which shows one div and hides the remaining divs in the bottom portion. Each div contains one form. The form is made up of 3 tables. The middle table is contained in a div, which will be hidden if a certain condition is met. Some data are given via a MySQL database. Form action is posted back to the same page, which is processed via ASP.
Below is a rough way in which the page works. (I hope that makes sense)
Code:
<a href=# onclick="showhidediv('ref')">blah</a>
<a href=# onclick="showhidediv('ref2')">blah2</a>
.
<div id='ref'>
<form>
<table>
.
</table>
<div id='table2>
<table>
.
</table>
</div>
<table>
.
</table>
</form>
</div>
<div id='ref2'>
.
.
.
</div>