I'm using (all right, just starting to learn) bootstrap and javascript and jQuery. I have a rather extensive experience in other programming languages, and I like understanding what happens.
so I have a dialog box containing just one input box, and I do not want a POST action to be fired when the user hits enter. I am using a dirty trick according to me, and I'm wondering how to do this more neatly.
<div class="modal-body">
<form enctype="multipart/form-data" class="well">
<input id="empty" name="empty" type="hidden"/></form>
<table width="100%">
<tr><td width="30%">accession#.plant#</td>
<td><input id="addendum" name="keyword" type="text"/></td></tr>
</table>
</div>
the unused "empty" form, it's the dirty trick that works for me on firefox 27.0.1
I have tried disabling the enter key completely, as suggested by answers to similar questions, but it has a non desirable side effect according to me: when entering data in a input element, the browser will give hints. disabling the enter key makes difficult selecting among them.