HTML forms allow users to send query information over the net. Database
and web programs from PubMed to Blast all use html forms for input
query data.
The following html codes generate a form for querying Yahoo! search engine:
<html>
<body>
<form name=f action="http://www.yahoo.com/bin/search">
Yahoo!
<input type=text size=40 name=p>
<input type=submit value=Search>
</form>
</body>
</html>
It looks like this:
Type in "bioinformatics" in the search field and click on Search.
Note the address field of your browser has changed to:
http://www.yahoo.com/bin/search
?p=bioinformatics
Note the first half of the above URL is the value of "action" in the form, the "p" immediately
after the question mark is the name of text input field in the form, and the value of "p" (in green)
is your query.
You may search Yahoo! by changing the value of "p" in the URL. In the address field of your browser,
change the URL to
http://www.yahoo.com/bin/search
?p=html+form
and hit return, you will be presented search results for HTML forms. For more
information about html forms, check the results of your Yahoo! search.
Understanding how forms work, you will be able to generate links to databases, servers, etc., without using
their input forms. See Perl Example 3 --- insert links
for an application.
|