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.