os:preview element
Describes a service that provides an Accelerator preview.
Usage
<os:preview
action = "sAction"
accept-charset = "sCharset"
enctype = "sEnclosureType"
method = "sMethod">
child elements
</os:preview>
Attributes
Attribute | Type | Required | Description |
---|---|---|---|
accept-charset |
sCharset |
No |
Any valid character set name. If not specified, the following is assumed: utf-8 Default. UTF-8. |
action |
sAction |
Yes |
A URL that specifies the target of this request. The template can contain replaced variables. |
enctype |
sEnclosureType |
No |
A content type for form data. application/x-www-form-urlencoded Default. Name/value pairs, with specific rules for encoding non-ASCII and reserved characters. multipart/form-data Submission is multipart MIME, suitable for binary data. Only valid with POST request. |
method |
sMethod |
No |
The HTTP request method to use. Case-insensitive. GET Default. Sends data as URL parameters. Appends os:parameter elements to the URL template. POST Send data as name/value pairs in the body of the request. |
Child elements
Element |
---|
Child element sequence
os:parameter
Parent elements
Element |
---|
Remarks
An Accelerator can optionally provide a HTML preview that is displayed when the user hovers over an Accelerator in the context menu. This can be useful to quickly obtain a map, in-place definition or translation, and even ratings or links to related content.
The preview window is limited to 320 x 240 (WH) on a 96 dots per inch (dpi) display. All content outside of the region is cut off. Content with scrollbars is not recommended. The preview window is suitable for light-weight user interaction; provide links to send the user to view the full Web page for more information.
Examples
The following Accelerator snippet uses an optional os:preview element to display the definition of the selected word when the user hovers over the Accelerator menu item.
<os:activity category="define">
<os:activityAction context="selection" >
<os:preview action= "http://www.example.com/preview.php?word={selection}"/>
<os:execute method="get" action="http://www.example.com/define.php">
<os:parameter name="word" value="{selection}" type="text" />
</os:execute>
</os:activityAction>
</os:activity>
Element information
Minimum supported system |
Windows XP with SP2 |
Can be empty | No |