Last Revised: 07/10/14 |
All Dynaweb applications should exit by running or calling this program. You should also run or call CDW999 from an application run from a workstation running FacetWin or PowerTerm when you want to display a web page, a text file, or a PDF file.
Applications should either:
- set the
HTML$
, and optionally theY5$
string variable, or - print a report to a text file (by calling CDS084 with printer name
PFIL
), or - print a report to a PDF file (by calling CDS084 with printer name
APDF
).
and then in each case, RUN
or CALL
"CDW999",HTML$,Y6$,TITLE$
when completed. In most cases you RUN
"CDW999"
which will display the document in a browser, then run the
menu or release the session. If you need to display multiple
documents, then you can CALL "CDW999"
which will return control
back to the calling program, which can then create the next report and
either CALL
or RUN "CDW999"
again.
If CDS084 was used to create a text or PDF file, then CDW999 will launch the browser displaying the file, otherwise CDW999:
- Replaces any field names referenced from
Y$
such asY.COMPNAME$
andY.DATE$
stored in square brackets inHTML$
, i.e.[COMPNAME]
and[DATE]
with the value from the task control variableY$
. - Processes any expression contained within braces {} using the bbweb uthtmout.wbb program.
- If
HTML$
includes a form with an input, and focus has not been set, either specifically, or using$bodyopt
, then CDW999 will name the form, if necessary, and assign focus to the first input on the page. - If run from a browser:
CDW999 sets the$title
global variable toY5$
if non-blank,
callsutsend.wbb
sendingHTML$
to the browser,
then callsutexit.wbb
usingCGI$
,
then runs CDS001 which will terminate the session. - If called or run from a nonbrowser,
Adds<html>
and<body>
tags toHTML$
if not already present,
Adds a style sheet link if specified in Dynaweb Control Maintenance,saves
HTML$
in a temporary string file based in the tmp folder below 'Document Root',
then launches a web browser pointing to the file, (Requires FacetWin or PowerTerm)
then if run and not called, runs the Dynamo menu program CDS001 or the external menu program.
This option requires that the Dynaweb Control Maintenance include the Http Name or IP address and Web Server Document Root Folder.
Example: Called from a FacetWin session |
HTML$="Hello World"
|
Browser will display: |
Example run from a FacetWin session |
1300 WEB:
|
Browser opens and displays |
Example of displaying a PDF file from a workstation application |
1400 PDFEXAMPLE:
|
Browser opens and displays |