Specifying Web generation for a specific browser

About browsers and HTML version

The Web DataWindow can generate XHTML and HTML optimized for different browsers. You can use the Browser choice for the XHTML and HTML formats on the Web Generation tab of the DataWindow property sheet to preview what the DataWindow looks like in different browsers. You can also specify an HTML version that the Web generation should use if it does not recognize the browser.

At runtime, a server-side script should find out what browser the current client is using and pass that information to the server component. For information, see “SetBrowser” and the SetBrowser method in the DataWindow Reference or online Help.

Using absolute positioning in Netscape

Netscape implements absolute positioning differently than Internet Explorer. To format the DataWindow with absolute positioning for Netscape browsers, you must set the DataWindow HTMLGen.NetscapeLayers property to true. You can do this in the DataWindow painter by selecting the Use Layers for Netscape check box on the Web Generation page of the DataWindow property view. Alternatively, you can use a DataWindow Modify call in the script for the Generate method of the HTML Generator (nv_remote_datawindow in PBDWRMT.PBL that ships with PowerBuilder).

The default DataWindow HTML Generator generates code for determining the browser type and version of the client browser. For Netscape browsers earlier than the 4.0 version, the DataWindow is formatted as an HTML table, whether or not the NetscapeLayers property is set.

NoteLimitations in Netscape Certain functionality in a Netscape browser using absolute positioning might not be identical to the functionality available with Internet Explorer. For example, you cannot tab between DataWindow columns using a Netscape browser on an NT machine, although you can do this using a Netscape browser on a Solaris machine.