paraiko / molgenis_apps-legacy

MOLGENIS Advanced Application and Computation Framework for the Life Sciences
www.molgenis.org
0 stars 1 forks source link

Bind enter key to text/inputbox edited instead of to form submit #45

Closed paraiko closed 11 years ago

paraiko commented 11 years ago

When enter is pressed on a page it defaults to the main submit button of the form, which is not always the intended action (for instance changing the paging size in matrix, with enter results in hitting the reload instead of the apply butttion

this is an annoyance of several users!

paraiko commented 11 years ago

possible solutions:

$("#id_of_textbox").keyup(function(event){ if(event.keyCode == 13){ $("#id_of_button").click(); } });

see http://stackoverflow.com/questions/155188/trigger-a-button-click-with-javascript-on-the-enter-key-in-a-text-box

paraiko commented 11 years ago

is duplicate of #16