PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the type of browser used by the Web user.
Versions 21 and later
WEBDEV - Browser code This function is now available in browser code.
New in version 21
WEBDEV - Browser code This function is now available in browser code.
WEBDEV - Browser code This function is now available in browser code.
Example
// Displays a specific page for IE9
IF BrowserType() = BrowserTypeInternetExplorer THEN
SWITCH BrowserVersion(BrowserMajorVersion)
CASE 9
PageDisplay(PAGE_Form_IE9)
OTHER CASE
PageDisplay(PAGE_Form_IE)
END
ELSE
PageDisplay(PAGE_Form)
END
Syntax
<Result> = BrowserType()
<Result>: Integer constant
Type of browser used by the Web user to display the site:
BrowserTypeChromeChrome.
Versions 21 and later
BrowserTypeEdge
New in version 21
BrowserTypeEdge
BrowserTypeEdge
Microsoft Edge.
BrowserTypeFirefoxFirefox.
BrowserTypeGeckoBrowser that is using the Gecko engine (other than Firefox).
BrowserTypeUnknownThe browser used is unknown or the information is missing.
BrowserTypeInternetExplorerInternet Explorer.
BrowserTypeOperaOpera.
BrowserTypeRobotRobot of search engine.
BrowserTypeSafariSafari.
BrowserTypeWebKitBrowser that is using the WebKit engine (other than Chrome and Safari).
Remarks
  • The function returns the BrowserTypeUnknown constant if the browser used by the Web user is unknown.
  • For a dynamic site (non-AWP site), the returned value corresponds to the browser used when connecting to the site. If the user changes browser (via a copy-paste of URL in another browser for example), this change is not detected.
  • Versions 20 and later
    If your project uses pre-launched sessions, this function must not be used in the project "Initializing" event. This function must be used in the event "Initializing the project after connection to the site".
    New in version 20
    If your project uses pre-launched sessions, this function must not be used in the project "Initializing" event. This function must be used in the event "Initializing the project after connection to the site".
    If your project uses pre-launched sessions, this function must not be used in the project "Initializing" event. This function must be used in the event "Initializing the project after connection to the site".
Component : wd240page.dll
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment