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

 

Form Tip:
Beware of Form Mailto Action

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

  
April 2000
Vol. 3, No. 4
 • JavaScript Tip
 • Form Tip
 • Search Engine Tip
  

If you've just started working with HTML forms, then you're probably using the "mailto" action to send the form data via email. That's not a good idea, since this method is unreliable.

The Web is the most interactive form of mass communication ever invented. With HTML, everyone in the world can become a publisher, posting their thoughts for anyone to read. Sooner or later, though, you'll want that communication to flow both ways, with visitors to your site having a chance to give you feedback.

While you can do that with a simple HREF "mailto" link, this kind of feedback is unstructured. Often you'll want visitors to give you specific information. That's especially true if you're running a business site and want visitors to submit orders or requests for information. In these cases you'll need an HTML form.

Forms are processed by submission to a CGI script. Unfortunately, CGI scripts require a fair amount of programming knowledge to create. Moreover, these scripts aren't cut-and-paste friendly in the same way that JavaScript programs are. Just learning how to configure a ready-made CGI script on your server can be a real headache.

As a result, many Webmaster prefer to submit their forms via email, setting the form's ACTION attribute to a "mailto" value. The code below shows a sample form using this approach:

<form method="post" 
   action="mailto:yourname@yoursite.com" 
     enctype="text/plain">
<input type=text 
   name=your_comments>
<input type=submit 
   value="Submit Your Comments">
</form>

This looks great, and may even work on your machine. But it doesn't work reliably for all visitors to your site. Whether or not a visitor can use this method depends on the mail client installed on their computer. And unfortunately, there's no way to test if that's the case for each of your visitors.

This can lead to the worst kind of situation where someone takes to time to give you feedback, then finds that they can't send the information to you!

Instead of using the "mailto" method, try using a remotely hosted CGI script like Response-O-Matic. This free service lets you access a CGI script run off of their servers. You build your HTML form as you normally would, but instead of setting the ACTION attribute to a "mailto," you fill in the URL of the remote CGI script. The CGI script translates your form into an email message and sends it on to the address you provide.

This approach is much more reliable than the "mailto" method. Try it, and see if it works for you.



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.