Javascript Form
CSGNetwork FREE Source Code, Javascript Source, and Code Snippets!
CSGNetwork Custom Search
     Bookmark and Share
Top Free Apps

Right click this window and select "view source" in order to copy the source for this script.

Example of using Javascript with a Form

In this example, the form's action is to post a mail message to an E-Mail address. We also want to display another page so that the client is aware that their input has been appropriately processed. This Javascript script is handy if the web page designer does not have CGI access on the server.

One potential problem that does occur is that the mail action will occur after the Javascript processing is completed. This could lead to the mail dialog box becoming hidden. You should alert the person filling in the form that the form will display an acknowledgement as well as E-Mail the form results to the target recipient.

Please enter your name:
Please enter your email address:

Bookmark and Share
Registered® Trademark™ and Copyrightę 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved