Guide to creating a web site, web design, web development, internet marketing, promotion, html tips and tricks, javascript and more.

Your Guide to Professional
Web Site Design and Development

HTML Codes
Web Development
Web Design Tips
JavaScript Codes
216 Web Safe Colors
CSS Tutorial
JavaScript Tutorial
ASCII Character Codes

Offering Free Javascript Tips, Snippets and Codes

Open Directory Projectfree ebooksfree articles
web site design development internet marketing and promotion tutorials

| Web Site Development | HTML Codes | HTML Tips | Web Design TipsJavascript Snippets | 216 Safe Colors | Symbols | CSS Tutorial | JavaScript Tutorial |

webmaster resources
website design

Disable Enter Key Within Forms

If you have an HTML form on your web page, many times your visitors may hit the 'Enter' key on their keyboard, instead of the 'Tab' key, thinking it will advance them to the next form field. However, the 'Enter' key will actually submit the form. This will cause you to receive incomplete form submissions.

To avoid this problem, you can use a piece of JavaScript within your HTML code that will disable the 'Enter' button within your forms until it is completely filled out.

Here is a real form we use to enable visitors to subscribe to our eTips publication:

Killer Internet Marketing Strategies
Ebooks: A Complete Guide to Self PublishingAvailable in EXE and PDF format

An exclusive gift for eTips subscribers!

Inside, you'll discover a complete step by step guide to making a living online.

You'll discover:

  • The Three Step Formula. If you excel at all three, you can literally guarantee your success

  • How to Create Your Own Product to Market on the Internet

  • How to design a Website Specifically Designed to Sell Your Product

  • How to Write Killer Ad Copy

  • How to Accept Payment Online

  • How to Set Up an Affiliate Program

  • Much More...

Make sure you don't miss this powerful resource. Subscribe to eTips now and you will receive your download instructions instantly.

Please rest assured that we respect your privacy and will not abuse the privledge of your subscription or give your email address to anyone under any circumstance. You may remove yourself at any time.

Subscribe to Etips

First Name:





The above form is real and will subscribe you to our highly popular, free weekly ezine - eTips. However, this form is also an example of how you can disable the 'Enter' key on your visitor's keyboard until your form is submitted.

Place the following JavaScript code within your web page HTML between your HEAD tags:

<script language=javascript type=text/javascript>
<!-- Script courtesy of - Your Guide to Professional Web Site Design and Development
function stopRKey(evt) {
   var evt = (evt) ? evt : ((event) ? event : null);
   var node = ( ? : ((evt.srcElement) ? evt.srcElement : null);
   if ((evt.keyCode == 13) && (node.type=="text")) {return false;}

document.onkeypress = stopRKey;

Script code provided by:
John Nitkowski

Submit your JavaScript code snippets. We'll credit you and give you a link to your website.