14.7.3.2 Parsing Forms with SANDCALL - Continued

We clicked on the previous example's "Fetch it" link to submit a previously parsed form, and we get:

Netscape: Untitled

File Edit View Go Communicator
Location:
Submitting https://docs.thunderstone.com/texis/demos/message/dbexam.html

Result:


[Source Code] [Other Demos...] [Thunderstone Home]
This simple example allows you to create, search, and delete records from Texis database table.
Enter your text or query here:

Just my records
Your record was added.

Our submitform function pulled the needed information from the table, and used <submit> to send it. The results were then displayed.

submitform inserts dummy data for empty text variables; that's why we got "User nbsp;text nbsp;data " for the textarea box on this form.

We used a neat trick with the <setvar> function to set the <submit> variables: the arguments to <submit> are fixed, yet both their names and values must be dynamically obtained from the tables. <setvar> lets us set an arbitrary variable's value at run time, and <submit> lets us make the variable's names be variables themselves.

Other uses

The form data we parsed has other uses. We could attach it to a Web search engine, letting users know that a result page has a search form on it. Or we could make a search-engine search engine, letting users search for just "engines" instead of pages. Or we could probe forms on the 'net with a Web crawler, to find out what they contain perhaps: any page with a search form usually contains much more data behind it.

Back: Parsing Forms with SANDCALL - Continued Next: FTPing Large Files
Copyright © 2024 Thunderstone Software LLC. All rights reserved.