A Form is an HTML construct used to get input from the user, which is usually processed using CGI Scripts or similar mechanisms. If you are not familiar with forms and CGI scripts, you should read An Instantaneous Introduction to CGI Scripts and HTML Forms.
Creating a formThe following is a form with three fields, a submit button and a reset button.
The above form was created using HTML code similar to the following :
<FORM NAME="sample" METHOD=POST ACTION="/cgi-bin/homestead/mail.pl?member_name"> Enter your name : <INPUT TYPE=TEXT NAME="yourname" SIZE=30><BR> Enter your age : <INPUT TYPE=TEXT NAME="yourage" SIZE=3><BR> Date of birth : <INPUT TYPE=TEXT NAME="yourdob" SIZE=10><BR> <INPUT TYPE=SUBMIT> <INPUT TYPE=RESET> </FORM>We can refer to this form as
If any of the fields are blank, an alert box will pop up and the form won't be submitted. The form is submitted if the validation routine returns a true; if it returns false, the submit operation is cancelled.
Setting the focusNote: The following example may not work on Microsoft Internet Explorer 3.x. You will find that the focus is not set properly. If anyone figures out what the problem actually is, please let me know.
In the preceeding example, the message gave no clue as to which field is
actually causing problems. Usually forms are much bigger and such a message
will not be of much use. In the next form, not only is the message more
informative, but the cursor is also placed at the erring field so that
the user can start typing in directly. For example, to position the cursor
If you belong to GeoCitiesYou might have noticed that the