|
The GenerateHTMLForm function is particularly useful when creating forms dynamically in Web.PB.
Here is an example of GenerateHTMLForm usage in a Web.PB user object function:
DataStore lds_data Long ll_return String ls_html, ls_style String ls_syntax, ls_action
ls_action = & "/cgi-bin/pbcgi60.exe/myapp/n_cst_html/f_test" lds_data = CREATE DataStore lds_data.DataObject = "d_emp_witharg" lds_data.SetTransObject(SQLCA) ll_return = lds_data.Retrieve(Long(as_empid)) IF ll_return = -1 THEN
END IF ll_return = lds_data.GenerateHTMLForm & (ls_syntax, ls_style, ls_action)
ls_html = "<HTML>" ls_html += ls_style ls_html += "<BODY>"
ls_html += "<H1>Employee Information</H1>" ls_html += "<HR>" ls_html += ls_syntax ls_html += "</BODY></HTML>"
DESTROY lds_data Return ls_html
|