Code Block Response |
Top Previous Next |
Once one of the button-stype webitem buttons is pressed, the equivalent of a web form is submitted to the UnForm server, to run the same rule set that contains the detect and button commands (-f and –r are used, along with any args options and a hard-coded "-p pdf"). The following values are available in the cgi$ template:
Use the prejob code block to interpret these items, and generate a cgiresponse$ string value. This value is returned to the web extension for processing, based on the content:
•http: or https: prefix displays a URL in a new tab •error: message text (use \n or <br> for line breaks) displays a message box titled "error", capitalized the same was as the prefix. •message: message text displays a message box titled "message". •other text renders in local browser window, and assumes HTML content
The webapi object can be used to generate http responses. Note these http values can also be used in <a href=> tags in a pure html response.
If no cgireponse$ is available, the print job result is returned instead, allowing artificial print jobs to execute (by generating text pages in a prejob code block, and allowing normal rule set processing to handle the job). The print job will be in PDF format.
|