Reputation: 593
first thanks a lot to people who made such a great tool as file-upload. I use file-upload (autoUpload:true) on a form with some other different input fields and because of file-upload, when I press "enter" key, nothing happen whereas I would like that this submit all my form.
is this possible ?
thanks
Upvotes: 1
Views: 1295
Reputation: 56459
Try the keyUp
event attached to the body. 13 is the key code for the enter key.
$("body").keyup(function (e) {
var code = (e.keyCode ? e.keyCode : e.which)
if(code == 13) {
$("form").submit();
}
});
If you want other key codes, see HERE
Upvotes: 4