 |
Typical questions visitors ask:

What is CGI? What are forms?
Here are some definitions concerning CGI programs and CGI uses:
- CGI, or Common Gateway Interface, is a program that can be activated by a visitor. When you search for items using Yahoo, you are using a basic CGI form. Whenever you sign a guestbook or see a visit counter, you are having another encounter with CGI.
- Visit counters are a good example of a CGI program. Often, when you visit a web page, you might find a box of numbers at the bottom, middle, or wherever the publisher placed it. The number shown is the number of visits the page had.
- Using a guestbook is a simple way to have visitors leave information to other visitors or the webmaster. By filling out a simple form, and clicking send, the user leaves their remark, no E-mailing reqired. In order for guestbooks to work, though, three pages have to be made. One with the basic information to be filled out, one with data as to "where the information goes," and a final one to post the information.
- Forms are the HTML side of CGI programming and have many uses. In terse, forms allow a user to input data. This data can be used in CGI programs (like the Yahoo! search engine) or JavaScript programs.


How do I make and use forms?
Below is an example of a "form". Guestbooks are based on these forms, but if all you want from this page is a guestbook form, sorry! Go to L-Page to register your page for one.
Example: |
|
HTML: |
<FORM>
This is a text area: <TEXTAREA NAME="text" ROWS=3 COLS=20>Write in here...</TEXTAREA>
These are radio buttons: <INPUT TYPE="radio" NAME="radio" VALUE="yes"> <INPUT TYPE="radio" NAME="radio" VALUE="no">
These are check boxes: <INPUT TYPE="checkbox" NAME="box" VALUE="yes1"> <INPUT TYPE="checkbox" NAME="box" VALUE="yes2">
This is a password box: <INPUT TYPE="password" NAME="password" SIZE=15>
This is a text box: <INPUT TYPE="text" NAME="words" VALUE="Type here..." SIZE=20>
These are the action buttons: <INPUT TYPE="submit" VALUE="SEND!"> <INPUT TYPE="RESET">
</FORM>
|
---|
|


What are image maps? How do I make one?
Image maps are a convenient tool. Best of all, they're easy to make. Image maps can take either the "<ISMAP>" tag, or can be used via CGI Script. Here is how they work: When you click a certain coordinate on the image, you arrive to a certain destination. ("F1Phreak's Home" was designed by myself.)
Image maps section off "hot spots" three ways: using circles, polygons, and rectangles.
- For circles, use:
<AREA SHAPE="circle" COORDS="x, y, r" HREF="address.html"> ...where "x" and "y" is a coordinate, and "r" is the radius.
- For rectangles, use:
<AREA SHAPE="rect" COORDS="x1, y1, x2, y2" HREF="address.html"> ...where the "x" and "y" coordinates are the points of the upper-left and lower-right corners of the rectangle.
- For polygons, use:
<AREA SHAPE="poly" COORDS="x1, y1, x2, y2, x3, y3" HREF="address.html"> ...where the "x" and "y" coordinates are the points of the corners of the polygon.
Example: |  |
HTML: |
<MAP NAME="imageMap">
<AREA SHAPE="RECT" COORDS="1, 1, 72, 39" HREF="F1Phreaks.html">
<AREA SHAPE="RECT" COORDS="88, 1, 177, 12" HREF="famous.html">
<AREA SHAPE="RECT" COORDS="180, 1, 249, 12" HREF="banners.html">
<AREA SHAPE="RECT" COORDS="251, 1, 319, 12" HREF="dates.html">
<AREA SHAPE="RECT" COORDS="321, 1, 369, 12" HREF="forfans.html">
<AREA SHAPE="RECT" COORDS="111, 13, 178, 25" HREF="expect.html">
<AREA SHAPE="RECT" COORDS="182, 13, 226, 25" HREF="f1quiz.html">
<AREA SHAPE="RECT" COORDS="228, 13, 282, 25" HREF="teamwork.html">
<AREA SHAPE="RECT" COORDS="285, 13, 361, 25" HREF="f1.html">
<AREA SHAPE="RECT" COORDS="89, 26, 146, 39" HREF="comments.html">
<AREA SHAPE="RECT" COORDS="150, 26, 247, 39" HREF="rcf1.html">
<AREA SHAPE="RECT" COORDS="183, 26, 247, 39" HREF="opinion.html">
<AREA SHAPE="RECT" COORDS="250, 26, 305, 39" HREF="notebook.html">
<AREA SHAPE="RECT" COORDS="308, 26, 389, 39" HREF="address.html">
</MAP>
<img src="images/imagemap.gif" border="0" width="400" height="40" usemap="#imageMap">
|
---|
|


Are forms exclusive to CGI?
CGI forms are a way of a visitor (or user) to input some data. This data could be a name or number, for instance. Javascript makes great use of forms. I strongly suggest visiting JavaScript Source to see a few examples.
Speaking of JavaScript...
Below is a sample of a JavaScript.



page info © 2001, m. tartàglia
|