WMLScript » WMLBrowser » WMLBrowser.refresh

Syntax:
WMLBrowser.refresh()

Directs the browser to update the currently displayed card.

The WMLBrowser.refresh function updates (refreshes) the user interface based upon the current WML browser context. In other words, the current card is updated.

If the refresh succeeds, the empty string "" is returned.

If the refresh fails, the browser should display an implementation dependent error message.

If the browser does not support the WMLBrowser.refresh function, an invalid is returned.

In WML, the refresh tag performs a similar task.

This function does not take a parameter.

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

<card id="card1">
   <p>
   refresh example
   </p>
   <do type="accept">
      <go href="RefreshExample.wmls#findrefresh()" />
   </do>
</card>

<card id="card2">
<p>
   refreshed!
</p>
</card>

</wml>
Explanation:

Code for RefreshExample.wml

Language(s): WML
Code:
extern function findrefresh()
{
   WMLBrowser.refresh();
   WMLBrowser.go("RefreshExample.wml#card2");
};
Explanation:

Code for RefreshExample.wmls

Language(s): WML

See Also: