SetBrowser – PB Docs 150

SetBrowser method (DataWindows)

Description

Specifies the Web browser for which you want to generate optimized HTML.

Controls

DataWindow type

Method applies to

Web

Server component

Syntax

[Web DataWindow server component]

Argument

Description

dwcomponent

A reference to a Web DataWindow server
component.

browsername

A string identifying the browser and
version. The value should match the string passed to the Web server
in the HTTP header. The corresponding server variable is HTTP_USER_AGENT.

Sets the value of the HTMLGen.Browser property for the DataWindow
object associated with the server component.

For information on recognized browsers, see HTMLGen.property.

Return Values

Returns an empty string if successful and the syntax error
message from the Modify method if it fails.

Usage

If the DataWindow recognizes the browser identifier, it will
generate HTML optimized for that browser. A server-side script can
get the browser identifier from the server variable HTTP_USER_AGENT.

This method calls the Modify method of
the server component’s DataStore to set the property.

For information about using the Web DataWindow, see the DataWindow Programmers
Guide
.

Examples

This JSP example identifies the current browser for
the component called dwGen:

In ASP, you can use the ServerVariables method of the Request
object to get the HTTP_USER_AGENT value:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x