You can intercept the enter key (code 34 I think...). Something like this: $("#myForm").bind("keypress", function(e) { if (e.keyCode == 34) return false; }); Keypress may be the wrong event, can't remember if forms submit on keyup, keydown or keypress
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
jQuery :: disable the enter key (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Never render the full layout... in ruby rails javascript rubyonrails ajax programming jquery degradation degradable
» jQuery and Rails' respond_to in ruby rails javascript rubyonrails ajax js jquery respond_to
» jQuery namespaced event bind... in javascript dom ajax js jquery events scraping scrape
» Load file into Div via Ajax in ajax jquery
» Dynamically Display Form Parts in jquery
» jQuery accordion in javascript js jquery ui accordion
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails