Using several HTML extensions allows you to write advanced scripts for Active Desktop and to control page updates in Channel Browser.
The Active Desktop for a Windows CE-based device supports a special HREF for launching an application from a hyperlink. The form is as follows:
<A HREF="mcexe://[appname]">Launch Text</A>
The appname parameter is the name of the application to be launched when the link is clicked.
The application must have been registered by placing a value of the same name as the executable file (.exe) in the registry at \HKLM\Software\Microsoft\Mobile Channels\Components.
Channel Browser and the device’s Active Desktop recognize the following special META tags. Embedding these META tags in the header of a page, either directly or through scripting, cause the page to be automatically handled or updated in a particular manner. These META tags — with the exception of Refresh — are ignored by Internet Explorer 4.0.
The META tags are summarized in the following table, proceeded by a detailed discussion of each.
HTTP-EQUIV value | Description | Support |
Notify | Catch cache or database updates. | Active Desktop, Channel Browser |
Refresh | Reload after a specified time interval. | Active Desktop |
LaunchApp | Execute application for desktop component. | Active Desktop |
Autosize | Control image scaling. | Channel Browser |
This META tag allows a page to be automatically updated when there is an update to a particular database, or when a particular item is updated in the cache. It is used to regenerate a page automatically when a new version of the page or one of its components comes in by means of a mechanism such as sync. The following code examples show the two forms of this META tag.
<META HTTP-EQUIV="Notify"
CONTENT="DBUPDATE=[DBname];URL=[RefreshUrl]">
<META HTTP-EQUIV="Notify"
CONTENT="CACHEUPDATE=[WatchUrl];URL=[RefreshUrl]">
Possible values are described in the following table.
Value | Meaning |
Dbname | Name of the database to monitor for updates. |
WatchUrl | URL of the item to monitor for cache updates. |
RefreshUrl | URL to load if an update is detected. |
This META tag causes a page to be automatically reloaded after a specified time interval. The form is as follows:
<META HTTP-EQUIV="Refresh" CONTENT="[secs];URL=[RefreshUrl]">
Possible values are described in the following table.
Value | Meaning |
secs | Sets the number of seconds until the page is reloaded. |
RefreshUrl | URL to load after the specified interval. |
This META tag allows an application to be launched by clicking on the header of an Active Desktop component on a Windows CE-based device. The form is:
<META HTTP-EQUIV="LaunchApp" CONTENT="[appname][?params]">
Possible values are described in the following table.
Value | Meaning |
appname | Name of the executable to launch. |
params | Optional comma-separated list of params to be passed to the application upon invocation. The application must have been registered by placing a value of the same name as the .exe in the registry at \HKLM\Software\Microsoft\Mobile Channels\Components. |
This META tag allows the default image scaling behavior to be disabled for a particular page. The HTML control attempts, by default, to scale images for display on the smaller form factor screen. However, if this META tag is specified in the page header, the images are at the full size. Scrollbars appear, if needed. The form is as follows:
<META HTTP-EQUIV="Autosize" CONTENT="Off">
Because the default value is always “On,” there is no need for any other value with the CONTENT attribute.