Please enable JavaScript to view this site.

A-Shell Consolidated Reference

XTEXT may be used as a very simple web browser, by specifying the TXFF_HTML flag in the TXC.DOCFMT'SRC field and setting the TXF_READONLY flag. The usual source type options apply (TXFF_STRING and TXFF_FILE), except that in the TXFF_FILE case, the filespec can also be a web-based URL. For web-based HTML documents and forms, the destination (TXC.DOCFMT'DST) must be a string/buffer.

In the case of a form, if the user clicks the SUBMIT button, XTEXT returns with exitcode=30 and the action, method, and data fields are output to the dst parameter in the following format:

&url=<form url or filespec>&action=actionstr&method=

methstr&name1=value1&...&nameN=valueN

The fields actionstr, methstr and nameN are as defined in the form itself. (methstr will be GET or POST.) The valueN fields return the data entered by the user in the form. (Checkbox and radio button fields return 0 or 1 to indicate empty or checked.) If a value contains the character "&", the entire value string will be quoted. So you may want to use STRTOK to simplify parsing the returned string.

Notes

Requires that the module hts13.dll be present in the bin directory, and that you use TXFF_HTML with TXFF_FILE in the TXC.DOCFMT'SRC or TXC.DOCFMT'DST fields. Only file mode is supported.
For browser mode, you must set TXF_READONLY. Otherwise it will be in editing mode, similar to the existing RTF editing mode.
You must use TXF_FITVIEW for all but the simplest files.
You may specify a web URL in the TXC.DOCFMT'SRC field, such as "http://www.microsabio.com". However, you may not output to a web address. (We recommend using .HTM as the extension for local HTML files.)
You can use the HTML format as simpler version of RTF with the goal of supporting just a few text attributes. To minimize the size of the outputted HTML file, you may want to set the TXC.HFLAGMASK and TXC.HFLAGS1 as follows:

TXC.hflagmask = &h0001   ! Set/clear all flags from HFLAGS1

TXC.hflags1 = &78006     ! strip out head, body, font, style tags

Although browser mode the TXFF_HTML flag were introduced in A-Shell 1112 of May 2008, the function was not fully operational until A-Shell 5.1.1191.3 of August 2010.