PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the platform of the 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
// Affiche une page particulière pour les Smartphones
 
SWITCH BrowserPlatform()
CASE BrowserPlatformAndroid, BrowserPlatformBlackBerry, ...
BrowserPlatformiPhone, BrowserPlatformMobile
PageDisplay(PAGE_Detail_Mobile)
OTHER CASE
PageDisplay(PAGE_Detail)
END
// Affiche une page particulière pour les Smartphones dans un site AWP
 
bVersionNav is boolean
 
ConfigureAWPContext(ctxDisk, ctxIDCookie)
DeclareAWPContext(bVersionNav)
 
IF bVersionNav = False THEN
SWITCH BrowserPlatform()
CASE BrowserPlatformAndroid, BrowserPlatformBlackBerry, ...
BrowserPlatformiPhone, BrowserPlatformMobile
PageDisplay("Liste-Voyages-smartphones")
OTHER CASE
PageDisplay(PAGE_Accueil)
END
END
bVersionNav = True
Syntax
<Result> = BrowserPlatform()
<Result>: Integer constant
Browser platform:
BrowserPlatformAndroidThe user displays the site on a Smartphone running Android.
BrowserPlatformBlackBerryThe user displays the site on a BlackBerry.
BrowserPlatformiPadThe user displays the site on an iPad.
BrowserPlatformiPhoneThe user displays the site on an iPhone.
BrowserPlatformMobileThe user displays the site on a Smartphone (other than the mentioned ones).
BrowserPlatformRobotThe user is a robot of search engine (therefore, the site is indexed).
BrowserPlatformStandardThe user does not use a specific platform (PCs, laptop computers, Mac, ...).
BrowserPlatformWindowsMobileThe user displays the site on a Smartphone running Windows Mobile.
Remark: This platform is no longer available from version 27.
BrowserPlatformWindowsPhoneThe user displays the site on a Smartphone running Windows Phone or Windows 10 Mobile.
Remark: This platform is no longer available.
Remarks
  • The function returns the BrowserPlatformStandard 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 into another browser), this change is not detected.
  • Versions 20 and later
    If your project uses pre-launched sessions, this function must not be used in the "Initializing" event of the project. 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 "Initializing" event of the project. 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 "Initializing" event of the project. This function must be used in the event "Initializing the project after connection to the site".
Component: wd270page.dll
Minimum version required
  • Version 16
Comments
Click [Add] to post a comment