Web Script Primitives
General User I/O¶
| Primitive | Description |
|---|---|
| dialog | Creates a custom dialog box or HTML form for user input/output |
Special User I/O Derived from Dialog¶
| Primitive | Description |
|---|---|
| say | Displays a message |
| asknumber | Asks the user to enter a number |
| askyesno | Asks the user a Yes/No question |
| asktext | Asks the user to enter a text string |
| askmultitext | Asks the user to enter a multiline text string |
| choose | Asks the user to choose an item from a list |
| readuserfile | Prompts a Web user for the name of a file and uploads its contents |
| redirect | Transfers the user to a Web page outside the active script |
| Appends text to the output buffer | |
| flush | Displays the contents of the output buffer |
Other I/O¶
| Primitive | Description |
|---|---|
| writecookie | Writes data to the user's Web browser as a persistent cookie |
| readcookie | Reads a persistent cookie from the user's Web browser |
| env | Gets HTML request header data from the Web server |
| sessionid | Unique ID assigned to the session by the Web server |
| readhttp | Reads a document from the Internet via the HTTP protocol |
| Sends an Internet e-mail message |
Dialog Support Functions¶
| Primitive | Description |
|---|---|
| dialogtemplate | HTML form text attached to a node |
| selecteditem | Extracts the selected drop-down menu item from a dialog result list |
| writelog | Appends text to the session history buffer |
| showlog | Contents of the session log buffer in HTML format |
Flow Control¶
| Primitive | Description |
|---|---|
| isweb | Returns true if the model is running as a Web application |
| dialogroot | Adds Back buttons to dialog input forms |
| branch | Creates a decision tree branch node |
Text Translation¶
| Primitive | Description |
|---|---|
| createhtmltable | HTML table presentation of matrix data |
| parsehtmltable | Parses an HTML table into matrix data |
| htmlencode | Replaces characters &, <, >, and " with HTML codes |
| htmldecode | Replaces HTML codes &, <, >, " with characters |
| escape | Replaces reserved characters in text strings with %nn codes |
| unescape | Replaces %nn codes in text strings with corresponding characters |
| striphtml | Text string with all HTML codes removed |