<form action="" name="searchForm" id="searchForm" method="post">
How can I make it submit using Javascript when user press enter?
edit: assuming I can’t edit the <html>, only using JS (jQuery if really needed)
edit2: it will also be great if myFormProcessFunction() was loaded
accept
Just capture the submit function as if the form had been submitted via the enter button normally.
document.searchForm.submit = function()
{
myFormProcessFunction()
return false; // prevents default action
}
Just capture the
submitfunction as if the form had been submitted via the enter button normally.