This page will display the data passed from an XHTML form. To use this page
with a form do the following:
- Create an XHTML file with a form.
- In the form start tag, set the action attribute to the name of this file, which will
be checkFormData.htm (unless you have changed the name). So an example would be:
<form action="checkFormData.htm" method="GET" name="f1">
You can rename this file, but if you do, you must also change the name in
the form start tag.
- In the form start tag, set the method attribute to GET. When you start
using forms for "real-world" applications the method will usually be POST, but
for this javaScript to function it must be GET. This program will not
work with method="POST"
- Make sure your form and this file are in the same folder. You may place
them in different folders, but if you do you must update the path in the action
attribute.
- Make sure and add a submit button to your form. When this button is
clicked, the form data will be bundled up and passed to this file. The JavaScript
in this file will then display the form data.
- Make sure you use the Windows version of IE or Opera, or the Mac version of IE. This program has been run successfully on these browsers. It does not run on the Windows or Mac versions
of Netscape, or the Mac version of Opera, and it hasn't been tested on any other browsers or platforms.