WMLScript

  • Used in WML pages
  • (.wmls)
  • Subset of JavaScript
  • Part of the WAP specification
  • Client-side scripting language
  • WML pages contain references to external WMLScript files
  • WMLScript is never embedded within a WML page
  • Compiled into byte code on the server and then sent to the WAP browser
  • WMLScript is case sensitive
// comment
/* comment */

Sample WMLScript

// check.wmls
extern function go_url(the_url) {
if (the_url=="Home") {
WMLBrowser.go("http://www.domain.com/home.wml")
}
}

Sample usage in WML page

<?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="no1" title="Card 1">
<do type="options" label="Go">
<go href="check.wmls#go_url('Home')"/>
</do>
</card>
</wml>



Resources
Sources
  • http://www.w3schools.com/wmlscript - WMLScript Tutorial

Parent URL: 
category/programming