Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 

Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format



Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 

HTML Tip:
Beware Of Misplaced INPUT Tags

by Tom Dahm,
Chief Operations Officer,
NetMechanic, Inc.

  
August 2000
(Part 2)
Vol. 3, No. 10
 • HTML Tip
 • Design Tip
 • Promotion Tip
  

Unlike most traditional communications media, the Internet lets you receive instant feedback from your audience. Forms are one of the most common ways to send information. A click on the ubiquitous "Submit" or "Send it!" button initiates the submit process to send information to the server.

If the Submit button on your form isn't properly placed within the FORM tag, the form won't send properly. Don't let a simple HTML error deprive you of valuable feedback from visitors or even online orders from customers.

An Easy Mistake That's Hard To Find

If you use a WYSIWYG HTML editor such as Front Page, you probably won't find this problem until you actually begin to test your form in a browser. The following code displays perfectly in some editors' preview options even though the INPUT control is outside the FORM tag:

<form method="POST" name="testForm" 
  action="enter URL address here">
Name: <input type="text" 
  name="name" size="20">
<BR>
Email: <input type = "text" 
  name="email" size="35">
<BR>
</form>
<input type="submit" value="Submit" 
  name="submit"> 
<input type="reset" value="Reset" 
  name="reset">

Explorer will display the Submit and Reset buttons, but won't process the commands. When you press the Submit button to send the information, you'll wait and wait and wait - and nothing will happen. Netscape is more unforgiving and won't display the buttons at all. Both Netscape and Explorer display the information differently, but neither actually submits the information.

Here's the page in Explorer:

And in Netscape:

Since you can't immediately see the error in an editor or in Explorer, always make sure to rigorously test your forms in all browsers before you post your Web site. You could have some extremely unhappy visitors if they input information into a long form and then can't submit it. They're unlikely to try a second time and you could lose both credibility (and sales!) from a simple error.

HTML 4.0 Standards Aren't Standard - Yet

HTML 4.0 guidelines state that all HTML controls should work whether they are inside or outside a FORM tag, but neither Netscape nor Explorer fully supports this suggested standard yet. HTML control elements define the type and function of the input controls of a form. Common HTML control elements are: <SELECT>, <BUTTON>, and <INPUT>.

There are specific situations where you might want HTML controls outside a form tag. While it doesn't sound like good coding practice, the technique can be useful if you're trying to create interactive documents. Use the controls with scripting code that allows the user to execute commands on the page.

If you're trying to create this type of interactive application, bypass the Netscape problem by placing the elements inside a <FORM> tag and set the ACTION attribute to ACTION=" ". Then, both Netscape and Explorer can display and execute them.

Otherwise, if you want your visitors to be able to submit information to you, be sure your INPUT tag is properly placed with the other controls inside your FORM tag. NetMechanic's HTML Toolbox makes this task easy: it analyzes and identifies many coding errors that can affect your Web page's display and functionality.

When visitors make the effort to communicate with you, be absolutely sure you that you always get the message!



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.