next up previous
Next: Merging the Form Producer Up: Handling HTML as Prolog Previous: Specific Structures

Specific Structures for Forms

 

In this section we explain the structures which represent the various input elements that provide forms.

For example, in order to generate a form suitable for sending input to the previously described phone database handler one could type at a Prolog prompt:

?:- ['/usr/local/src/pillow/pillow.pl'],
    output_html([
        start,
        title('Telephone database'),
        heading(2,'Telephone database'),
        $,
        start_form('http://www.clip.dia.fi.upm.es/cgi-bin/phone_db.pl'),
        'Click here, enter name of clip member, and press Return:', 
        \\,
        input(text,[name=person_name,size=20]),
        end_form,
        end]).

Of course, one could have also simply written directly the resulting HTML document:

<html>
<title>Telephone database</title>
<h2>Telephone database</h2>
<p>
<form method="POST"
 action="http://www.clip.dia.fi.upm.es/cgi-bin/phone_db.pl">
Click here, enter name of clip member, and press Return:
<br>
<input type="text" name="person_name" size="20">
</form>
</html>


next up previous
Next: Merging the Form Producer Up: Handling HTML as Prolog Previous: Specific Structures

Daniel Cabeza Gras
Fri Oct 4 18:56:02 MET DST 1996