My Linux Stuff - Complete Blog For Linux Articles

My Linux Stuff - Complete Blog For Linux Articles

A Website For Complete Linux OS,Step by Step linux Installtion, Linux Tips and Tricks and Linux Stuff and so on... Connect and sharing here....

Subscribe Now!

Enter your email address:

Wednesday, December 22, 2010

Disable-Form-Submit-on-Enter-Key-Press Link

The post Enter Key as the Default Button describes how to set the default behaviour for enter key press. However, sometimes, you need to disable form submission on Enter Key press. If you want to prevent it completely, you need to use OnKeyPress handler on <body> tag of your page. The below link show how to Disable-Form-Submit-on-Enter-Key-Press Link http://www.bloggingdeveloper.com/post/Disable-Form-Submit-on-Enter-Key-Press.aspx Disable-Form-Submit-on-Enter-Key-Press L...

How To: Disable Form Submit on Enter Key Press

The post Enter Key as the Default Button describes how to set the default behaviour for enter key press. However, sometimes, you need to disable form submission on Enter Key press. If you want to prevent it completely, you need to use OnKeyPress handler on  tag of your page. The javascript code should be: <script language="JavaScript"> function disableEnterKey(e) {      var key;          if(window.event)           key = window.event.keyCode; //IE   ...

Related Posts Plugin for WordPress, Blogger...