[jQuery] Prevent form submission when enter is hit with jQuery
That's good to know Roberto. Thanks for following up.
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of Roberto Ortelli
Sent: Thursday, November 16, 2006 8:41 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Prevent form submission when enter is hit with jQuery
Ah, problem solved. FYI:
$("#to").keypress(function(e){
return !(e.keyCode == 13);
});
where #to is the ID of a form input[@type=text] field, easy!
2006/11/16, Roberto Ortelli <rortelli@gmail.com>: