Displaying HTML Pages Distributed With Your Application

To display HTML pages distributed with your application, you include the HTML filename in the VALUE clause of the DISPLAY WEB-BROWSER statement. For example:

display web-browser, value "myfile.htm".

This opens and displays the file "myfile.htm" inside the WEB-BROWSER control.

Using this method, you can display an HTML forms-based front end for your application. To pass user input values from the HTML form to your COBOL application, you must write a CGI program as described in Writing a CGI Program. Then the HTML program can interact with the CGI program on the Web server, and the CGI program can interact with your COBOL code.

If you want the <Enter> key to be active on an HTML page, add the USE-RETURN style to the WEB-BROWSER control. This permits users to press <Enter> after filling out a form to submit the form. If you do not add the USE-RETURN style, pressing the <Enter> key will normally terminate input (e.g., generate a button-pushed event for the default push-button).