Home > Articles > Web Development > Perl

  • Print
  • + Share This

Browsing by Email

In order to archive browsing via email, www4mail encloses an HTML page with a special FORM tag whose action is a mailto URL. For example, the original home page of InformIT (when filtered by www4mail) contains the following modified header:

	<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded"

All existing HTML forms in the HTML page are converted to HIDDEN variables named XFORM, which will be sent back to www4mail in order to define the locations of the various forms. In addition, all anchor tags (and image tags, when necessary) are converted to HTML checkboxes of a variable named XGET. In the InformIT example, the following strings:

	<table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#354278">
	<td width="149"><a href="/index.asp?session_id={54Di....>
	<img src="/images/informit_logo.gif" width="172" height="81" border="0"></a>
	. . .

are modified by www4mail as:

	<table border="0" cellspacing="0" cellpadding="0" width="100%" bgcolor="#354278">
	<td width="149"><INPUT TYPE="checkbox" NAME="XGET" 
	<U[IMAGE: informit_logo.gif]</U></td>	
	. . .

In this case, the anchor link has been replaced while the logo image of InformIT has been replaced by an automatically generated ALT entry of "[IMAGE: informit_logo.gif]". However, this ALT string is only generated when the image has an associated anchor tag or if the user has requested inclusion of links for images.

After receiving the requested Web page, users can select which links to follow and fill out forms as if they were surfing the Web via a live connection (although with a larger time delay). After selecting several links to follow, the user clicks on the specially provided Search or Submit button named "Get Selected Document(s)". The browser then automatically generates an email message to the www4mail server, with the list of selected XGET variables. The server, when it receives the email, will treat this as a request from a new page. For the end user, it becomes a simple process of viewing the initial page in a Web browser, selecting the links to follow, and clicking a button to generate a new request via email to the www4mail server.

For submitting form data, such as to search engines like AltaVista, the Submit or Search button associated with the search field must be used to submit the form data to the www4mail server. As discussed in the second article of this series (Part II: www4mail on the Run), the "Get Selected Document(s)" button is only useful when submitting links for browsing. In the default attachment mode — when the user has a Web browser — www4mail works, and it is quite easy to submit form data to search engines and obtain the search results as HTML page replies.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.