The cgiLoadHtmlIFS procedures loads an HTML document into an internal work buffer and readies it for processing.
The cgiLoadHtmlIFS procedure loads HTML from an IFS file into an internal work buffer and readies it for processing by the cgiSetHtmlVar and cgiWrtSection procedures.
section-count cgiLoadHtmlIFS( szIFSFile 1024A Const VARYING bReplace N Const OPTIONS(*NOPASS) ) |
|
See also: cgiLoadHtml, cgiWrtSection, cgiSetHtmlVar cgiInit |
*...v....1....v....2....v....3....v....4....v....5....v....6....
'/www/docs/orderform.html'
If the function succeeds, the return value is the number of CGILIB Sections that were loaded. If the function fails, 0 is returned and a message is written to the joblog.
Call cgiLoadHtmlIFS to load HTML from the IFS only. Do not use it to load HTML stored in source file members. For source members, use the cgiLoadHtml procedure.
/INCLUDE XTOOLS/QCPYSRC,CGI
.....DName+++++++++++EUDS.......Length+TDc.Functions+++++++++++++++++++++++++
D CONTACT S 20A
D CMPNAME S 30A
D PHONE S 11P 0
.....C..n01..............OpCode(ex)Extended-factor2++++++++++++++++++++++++++++
C callp cgiInit(0)
C eval CONTACT = cgiGetVar('CONTACT')
C eval CMPNAME = cgiGetVar('COMPANY')
C eval PHONE = cgiGetVarI('PHONE')
C if cgiLoadHtmlIFS('/cozzi/confirm.html') <= 0
C callp wrtjoblog('Could not load HTML file.')
C endif