The ScreenOrientation Meta Tag is used to control the screen orientation and layout, and can register to receive an event when it changes. A new orientation will persist if PocketBrowser is closed or the device is warm-booted.
ScreenOrientation (META Tag) Syntax <META HTTP-Equiv="ScreenOrientation" content="[orientation> <META HTTP-Equiv="ScreenOrientation" content="ScreenOrientationEvent:url('[jsFunction | url]')">
Items listed in this section indicate methods or, in some cases, indicate parameters which will be retrieved.
Default Value Normal Sets the screen orientation to portrait Device Dependant RightHanded Sets the screen orientation to righthanded (landscape). Note the webpage will not reformat in line with the new screen size automatically. Device Dependant LeftHanded Sets the screen orientation to lefthanded (landscape). Note the webpage will not reformat in line with the new screen size automatically. Device Dependant UpsideDown Sets the screen orientation to upside down, useful if presenting the device to a customer to obtain a signature. Device Dependant
Retrieval tags return information by replacing the text in place holders, defined as '%s' or '%<number>'. Each place holder represents 1 return value with '%s' being populated sequentially or '%<number>' providing direct acces to the desired value.
ScreenOrientationEventThe screen orientation event is sent when the current PocketBrowser application changes the orientation of the screen. For devices with an inbuilt accelerometer this event will also be sent when the user physically rotates the device to a new orientation.
ID Name Description 1 Orientation Either 'Normal', 'RightHanded', 'LeftHanded' or 'UpsideDown'
The following example orientates the screen to righthanded in landscape mode:
<META HTTP-Equiv="ScreenOrientation" Content="RightHanded">
Copy example to clipboard
Effect on Command Areas and Contol ButtonsWhen the screen orientation changes, either using the ScreenOrientation tag or by rotating a device with hardware support, the command areas will automatically move and resize to fit the new layout. However the buttons themselves are not moved and in some cases this may result in them being off the screen or not in the expected position. If so they must be moved manually by detecting the ScreenOrientationEvent.
Supported Platforms Windows Mobile Persistence ScreenOrientationEvent is page specific. Setting the screen orientation will persist across pages and will also be remembered if PocketBrowser is quit. Min. Requirements A device with a screen