logging in or signing up WML Script mitalinarwani Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 381 Category: Science & Tech.. License: All Rights Reserved Like it (0) Dislike it (0) Added: September 17, 2010 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... By: ankits098 (14 month(s) ago) please give me authority to download wml script ppt Saving..... Post Reply Close Saving..... Edit Comment Close Premium member Presentation Transcript WML Script : WML Script Radadiya Bankim Research Assistant, Computer Science Department, Saurashtra University, Rajkot Dialog Library : Dialog Library alert() confirm() prompt() alert() : alert() The alert() function displays the specified message, waits for a confirmation, and then returns an empty string. Syntax n = Dialogs.alert(message) Exapmle var a = Dialogs.alert("The value must be numeric!"); Result a=“” confirm() : confirm() The confirm() function displays a specified message, waits for an answer, and then returns a Boolean value depending on which answer the user selected. If the user selected the ok value the return value is true, and if the user selected the cancel value the return value is false. Syntax n = Dialogs.confirm(message, ok, cancel) Exapmle var a = Dialogs.confirm("Exit?","Yes","No"); Result a = true (if "Yes" is selected) a = false (if "No" is selected) prompt() : prompt() The prompt() function displays a specified message and waits for an input. The second parameter is a default input, that will be returned if the user does not enter a value. This function returns the user input or the default value. Syntax n = Dialogs.prompt(message, defaultinput) Exapmle var a = Dialogs.prompt("Enter a number:","3"); Result a = "5" (if the user entered the value 5) a = "3" (if the user did not enter a value) Float Library : Float Library ceil() floor() int() maxFloat() minFloat() pow() round() sqrt() ceil() : ceil() The ceil() function returns the nearest integer that is not smaller than the number parameter value. Syntax n = Float.ceil(number) Exapmle var a = Float.ceil(5.32); var b = Float.ceil(5.55); var c = Float.ceil(-5.32); Result a = 6 b = 6 c = -5 floor() : floor() The floor() function returns the nearest integer that is not larger than the number parameter value. Syntax n = Float.floor(number) Exapmle var a = Float.floor(5.32); var b = Float.floor(-5.32); Result a = 5 b = -6 int() : int() The int() function returns the integer part of the number parameter. Syntax n = Float.int(number) Exapmle var a = Float.int(5.32); Result a = 5 maxFloat() : maxFloat() The maxFloat() function returns the largest possible floating-point number. Syntax n = Float.maxFloat() Exapmle var a = Float.maxFloat(); Result a = 3.40282347E+38 minFloat() : minFloat() The minFloat() function returns the smallest possible floating-point number. Syntax n = Float.minFloat() Exapmle var a = Float.minFloat(); Result a = 1.17549435-38 pow() : pow() The pow() function raises the first parameter to the power of the second parameter and returns the result. Syntax n = Float.pow(number1, number2) Exapmle var a = Float.pow(4,2); var b = Float.pow(-2,3); Result a = 16 b = -8 round() : round() The round() function returns the nearest integer to the number parameter. Syntax n = Float.round(number) Exapmle var a = Float.round(3.5); var b = Float.round(3.4); Result a = 4 b = 3 sqrt() : sqrt() The sqrt() function returns the square root of the number parameter value. Syntax n = Float.sqrt(number) Exapmle var a = Float.sqrt(9); var b = Float.sqrt(6.25); Result a = 3 b = 2.5 Lang Library : Lang Library abort() abs() characterSet() exit() float() isFloat() isInt() maxInt() min() minInt() parseFloat() parseInt() random() max() abort() : abort() The abort() function aborts a WMLScript and returns a message to the caller of the script. Syntax Lang.abort(text) Exapmle var errtxt = "Illegal value"; Lang.abort("Error in function: " + errtxt); Result The script is aborted, and the string "Error in function: Illegal value" is returned to the caller of the script. abs() : abs() The abs() function returns the absolute value of a number. Syntax n = Lang.abs(number) Exapmle var a = Lang.abs(-5); var b = Lang.abs(-3.4); Result a = 5 b = 3.4 characterSet() : characterSet() The characterSet() function returns an integer that defines the character set supported by the WMLScript interpreter. Syntax n = Lang.characterSet() Exapmle var a = Lang.characterSet(); Result a = 4 exit() : exit() The exit() function ends a WMLScript and returns a value to the caller of the script. Syntax Lang.exit(value) Exapmle Lang.exit("Value is 500"); Result The script ends, and the value "Value is: 500" is returned to the caller of the script. float() : float() The float() function returns a boolean value that is true if floating-point numbers are supported, and false if not. Syntax n = Lang.float() Exapmle var a = Lang.float(); Result var a = true isFloat() : isFloat() The isFloat() function returns a boolean value that is true if the value parameter can be converted into a floating-point number by the parseFloat() function, and false if not. Syntax n = Lang.isFloat(value) Exapmle var a = Lang.isFloat("576"); var b = Lang.isFloat("-576"); var c = Lang.isFloat("6.5"); var d = Lang.isFloat(" -9.45e2"); var e = Lang.isFloat("@13"); var f = Lang.isFloat("hello"); Result a = true, b = true, c = true, d = true, e = false, f = false isInt() : isInt() The isInt() function returns a boolean value that is true if the value parameter can be converted into an integer by the parseInt() function, and false if not. Syntax n = Lang.isInt(value) Exapmle var a = Lang.isInt("576"); var b = Lang.isInt("-576"); var c = Lang.isInt("6.5"); var d = Lang.isInt("@13"); var e = Lang.isInt("hello"); Result a = true, b = true, c = true, d = false, e = false max() : max() The max() function returns the largest value of two numbers. Syntax n = Lang.max(number1, number2) Exapmle var a = Lang.max(20, 40.3); var b = Lang.max(60, 59.7); Result a = 40.3 b = 60 maxInt() : maxInt() The maxInt() function returns the maximum possible integer value. Syntax n = Lang.maxInt() Exapmle var a = Lang.maxInt(); Result a = 2147483647 min() : min() The min() function returns the smallest value of two numbers. Syntax n = Lang.min(number1, number2) Exapmle var a = Lang.min(20, 40.3); var b = Lang.min(60, 59.7); Result a = 20 b = 59.7 minInt() : minInt() The minInt() function returns the minimum possible integer value. Syntax n = Lang.minInt() Exapmle var a = Lang.minInt(); Result a = -2147483648 parseFloat() : parseFloat() The parseFloat() function returns a floating-point value defined by the string value. Syntax n = Lang.parseFloat(string) Exapmle var a = Lang.parseFloat("2345.14"); var b = Lang.parseFloat(" -4.45e2 Kg"); var c = Lang.parseFloat(" +4.45e2 Kg"); var d = Lang.parseFloat("-.3 C"); var e = Lang.parseFloat(" 300 "); Result a = 2345.14 b = -4.45e2 c = 4.45e2 d = -0.3 e = 300.0 parseInt() : parseInt() The parseInt() function returns an integer defined by the string value. Syntax n = Lang.parseInt(string) Exapmle var a = Lang.parseInt("2345"); var b = Lang.parseInt("200 m/s"); Result a = 2345 b = 200 random() : random() The random() function returns a random integer between 0 and the number parameter. Syntax n = Lang.random(number) Exapmle var a = Lang.random(6.5); Result a = A random integer between 0 and 6 URL Library : URL Library escapeString() getFragment() getHost() getParameters() getPath() getPort() getQuery() getScheme() isValid() resolve() unescapeString() escapeString() : escapeString() The escapeString() function replaces special characters in a URL with an escape sequence, and return the result. Syntax n = URL.escapeString(url) Exapmle var a = URL.escapeString("http://w3Schools.com/wml/"); Result a = "http%3a%2f%2fw3Schools.com%2fwml%2f" getFragment() : getFragment() The getFragment() function returns the fragment in the url parameter. Syntax n = URL.getFragment(url) Exapmle var a = URL.getFragment("http://w3schools.com/wml#read"); var b = URL.getFragment("http://w3schools.com/wml"); Result a = "read“ b = "" getHost() : getHost() The getHost() function returns the host specified in the url parameter. Syntax n = URL.getHost(url) Exapmle var a = URL.getHost("http://www.w3schools.com/wml"); var b = URL.getHost("/wml/functions"); Result a = www.w3schools.com b = "" getParameters() : getParameters() The getParameters() function returns the parameter in the last path segment of the url parameter. Syntax n = URL.getParameters(url) Exapmle var a = URL.getParameters("http://w3schools.com/wml;tip"); var b = URL.getParameters("http://w3schools.com/wml"); Result a = "tip“ b = "" getPath() : getPath() The getPath() function returns the path specified in the url parameter. Syntax n = URL.getPath(url) Exapmle var a = URL.getPath("http://w3schools.com/wml/tips.htm"); var b = URL.getPath("http://w3schools.com"); Result a = "/wml/tips.htm“ b = "" getPort() : getPort() The getPort() function returns the port number specified in the url parameter. Syntax n = URL.getPort(url) Exapmle var a = URL.getPort("http://w3schools.com:80"); var b = URL.getPort("http://w3schools.com"); Result a = "80“ b = "" getQuery() : getQuery() The getQuery() function returns the query part in the specified URL. Syntax n = URL.getQuery(url) Exapmle var a=URL.getQuery("http://w3s.com/go.asp?name=bill"); var b=URL.getQuery("http://w3s.com"); Result a = “name=bill“ b = "" getScheme() : getScheme() The getScheme() function returns the scheme in the specified URL. Syntax n = URL.getScheme(url) Exapmle var a = URL.getScheme("http://www.w3schools.com"); var b = URL.getScheme("www.w3schools.com"); var c = URL.getScheme("ftp://www.w3schools.com"); Result a = "http“ b = "“ c = "ftp" isValid() : isValid() The isValid() function returns a boolean value that is true if the specified URL has the right syntax, and false if not. Syntax n = URL.isValid(url) Exapmle var a = URL.isValid("http://www.w3schools.com"); var b = URL.isValid("http//www.w3schools.com"); var c = URL.isValid("http://www.w3schools.com!!!!"); Result a = "true“ b = "false“ c = "false" resolve() : resolve() The resolve() function returns an absolute URL from the specified baseurl and the specified relativeurl. Syntax n = URL.resolve(baseurl, relativeurl) Exapmle var a=URL.resolve("http://w3schools.com", "/wml/n.wml"); Result a = "http://w3schools.com/wml/n.wml" unescapeString() : unescapeString() The unescapeString() function replaces the escape sequences in a URL with characters, and return the result. Syntax n = URL.unescapeString(string) Exapmle var a=URL.unescapeString("http%3a%2f%2fw3s.com%2wml"); Result a = "http://w3s.com/wml" WMLBrowser Library : WMLBrowser Library getCurrentCard() getVar() go() newContext() prev() refresh() setvar() getCurrentCard() : getCurrentCard() The getCurrentCard() function returns the relative URL of the current card. Syntax n = WMLBrowser.getCurrentCard() Exapmle var a = WMLBrowser.getCurrentCard(); Result a = "card1#note" getVar() : getVar() The getVar() function returns the value of the specified variable in the browser context. Syntax n = WMLBrowser.getVar(variable) Exapmle var a = WMLBrowser.getVar("weeks"); Result a = "52" go() : go() The go() function goes to a new card (specified by the new URL), and returns an empty string Syntax n = WMLBrowser.go(url) Exapmle var a = WMLBrowser.go(card); Result a = "" newContext() : newContext() The newContext() function clears all variables of the WML context, and returns an empty string. Syntax n = WMLBrowser.newContext() Exapmle var a = WMLBrowser.newContext(); Result a = "" prev() : prev() The prev() function tells the WML browser to go back to the previous WML card, and returns an empty string. Syntax n = WMLBrowser.prev() Exapmle var a = WMLBrowser.prev(); Result a = "" refresh() : refresh() The refresh() function refreshes the current card, and returns an empty string if the refresh succeeded, or a non-empty string if it failed. Syntax n = WMLBrowser.refresh() Exapmle var a = WMLBrowser.refresh(); Result a = "" setVar() : setVar() The setVar() function sets the value of the specified variable in the browser context, and returns true if the new value where implemented successfully, and false if not Syntax n = WMLBrowser.setVar(variable, value) Exapmle var a = WMLBrowser.setVar("weeks", 34); Result a = true String Library : String Library charAt() compare() elementAt() elements() find() format() insertAt() isEmpty() length() removeAt() replace() replaceAt() squeeze() subString() toString() trim() charAt() : charAt() The charAt() function returns a string. The string contains only one character. The character returned is the character that is placed in the position of the index parameter. Syntax n = String.charAt(string, index) Exapmle var a = String.charAt("world",2); var b = String.charAt("world",0); var c = String.charAt("world",10); Result a = "r“ b = "w“ c = "" compare() : compare() The compare() function returns 0 if the value of string1 and string2 is identical, -1 if the value of string1 is smaller than string2, and 1 if the value of string1 is larger than string2. Syntax n = String.compare(string1, string2) Exapmle var a = String.compare("world","world"); var b = String.compare("I","world"); var c = String.compare("world","I"); Result a = 0 b = -1 c = 1 elementAt() : elementAt() The elementAt() function separates the value of the string parameter into elements according to the specified separator parameter, and then returns the element with the given index. Syntax n = String.elementAt(string, index, separator) Exapmle var a= String.elementAt("Visit W3Schools today",0," "); var b= String.elementAt("Visit W3Schools today",1," "); var c= String.elementAt("Visit W3Schools today",2," "); var d= String.elementAt("Apples+Bananas",0,"+"); var e= String.elementAt("Apples+Bananas",1,"+"); var f= String.elementAt("Apples+Bananas",5,"+"); Result a = "Visit“ b = "W3Schools“ c = "today“ d = "Apples“ e = "Bananas“ f = "Bananas" elements() : elements() The elements() function returns the number of times the value specified in the separator parameter appears in a string. Syntax n = String.elements(string, separator) Exapmle var a = String.elements("Visit W3Schools!","i"); var b = String.elements("Visit W3Schools!","V"); var c = String.elements("Visit W3Schools!"," "); Result a = 2 b = 1 c = 1 You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
WML Script mitalinarwani Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 381 Category: Science & Tech.. License: All Rights Reserved Like it (0) Dislike it (0) Added: September 17, 2010 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... By: ankits098 (14 month(s) ago) please give me authority to download wml script ppt Saving..... Post Reply Close Saving..... Edit Comment Close Premium member Presentation Transcript WML Script : WML Script Radadiya Bankim Research Assistant, Computer Science Department, Saurashtra University, Rajkot Dialog Library : Dialog Library alert() confirm() prompt() alert() : alert() The alert() function displays the specified message, waits for a confirmation, and then returns an empty string. Syntax n = Dialogs.alert(message) Exapmle var a = Dialogs.alert("The value must be numeric!"); Result a=“” confirm() : confirm() The confirm() function displays a specified message, waits for an answer, and then returns a Boolean value depending on which answer the user selected. If the user selected the ok value the return value is true, and if the user selected the cancel value the return value is false. Syntax n = Dialogs.confirm(message, ok, cancel) Exapmle var a = Dialogs.confirm("Exit?","Yes","No"); Result a = true (if "Yes" is selected) a = false (if "No" is selected) prompt() : prompt() The prompt() function displays a specified message and waits for an input. The second parameter is a default input, that will be returned if the user does not enter a value. This function returns the user input or the default value. Syntax n = Dialogs.prompt(message, defaultinput) Exapmle var a = Dialogs.prompt("Enter a number:","3"); Result a = "5" (if the user entered the value 5) a = "3" (if the user did not enter a value) Float Library : Float Library ceil() floor() int() maxFloat() minFloat() pow() round() sqrt() ceil() : ceil() The ceil() function returns the nearest integer that is not smaller than the number parameter value. Syntax n = Float.ceil(number) Exapmle var a = Float.ceil(5.32); var b = Float.ceil(5.55); var c = Float.ceil(-5.32); Result a = 6 b = 6 c = -5 floor() : floor() The floor() function returns the nearest integer that is not larger than the number parameter value. Syntax n = Float.floor(number) Exapmle var a = Float.floor(5.32); var b = Float.floor(-5.32); Result a = 5 b = -6 int() : int() The int() function returns the integer part of the number parameter. Syntax n = Float.int(number) Exapmle var a = Float.int(5.32); Result a = 5 maxFloat() : maxFloat() The maxFloat() function returns the largest possible floating-point number. Syntax n = Float.maxFloat() Exapmle var a = Float.maxFloat(); Result a = 3.40282347E+38 minFloat() : minFloat() The minFloat() function returns the smallest possible floating-point number. Syntax n = Float.minFloat() Exapmle var a = Float.minFloat(); Result a = 1.17549435-38 pow() : pow() The pow() function raises the first parameter to the power of the second parameter and returns the result. Syntax n = Float.pow(number1, number2) Exapmle var a = Float.pow(4,2); var b = Float.pow(-2,3); Result a = 16 b = -8 round() : round() The round() function returns the nearest integer to the number parameter. Syntax n = Float.round(number) Exapmle var a = Float.round(3.5); var b = Float.round(3.4); Result a = 4 b = 3 sqrt() : sqrt() The sqrt() function returns the square root of the number parameter value. Syntax n = Float.sqrt(number) Exapmle var a = Float.sqrt(9); var b = Float.sqrt(6.25); Result a = 3 b = 2.5 Lang Library : Lang Library abort() abs() characterSet() exit() float() isFloat() isInt() maxInt() min() minInt() parseFloat() parseInt() random() max() abort() : abort() The abort() function aborts a WMLScript and returns a message to the caller of the script. Syntax Lang.abort(text) Exapmle var errtxt = "Illegal value"; Lang.abort("Error in function: " + errtxt); Result The script is aborted, and the string "Error in function: Illegal value" is returned to the caller of the script. abs() : abs() The abs() function returns the absolute value of a number. Syntax n = Lang.abs(number) Exapmle var a = Lang.abs(-5); var b = Lang.abs(-3.4); Result a = 5 b = 3.4 characterSet() : characterSet() The characterSet() function returns an integer that defines the character set supported by the WMLScript interpreter. Syntax n = Lang.characterSet() Exapmle var a = Lang.characterSet(); Result a = 4 exit() : exit() The exit() function ends a WMLScript and returns a value to the caller of the script. Syntax Lang.exit(value) Exapmle Lang.exit("Value is 500"); Result The script ends, and the value "Value is: 500" is returned to the caller of the script. float() : float() The float() function returns a boolean value that is true if floating-point numbers are supported, and false if not. Syntax n = Lang.float() Exapmle var a = Lang.float(); Result var a = true isFloat() : isFloat() The isFloat() function returns a boolean value that is true if the value parameter can be converted into a floating-point number by the parseFloat() function, and false if not. Syntax n = Lang.isFloat(value) Exapmle var a = Lang.isFloat("576"); var b = Lang.isFloat("-576"); var c = Lang.isFloat("6.5"); var d = Lang.isFloat(" -9.45e2"); var e = Lang.isFloat("@13"); var f = Lang.isFloat("hello"); Result a = true, b = true, c = true, d = true, e = false, f = false isInt() : isInt() The isInt() function returns a boolean value that is true if the value parameter can be converted into an integer by the parseInt() function, and false if not. Syntax n = Lang.isInt(value) Exapmle var a = Lang.isInt("576"); var b = Lang.isInt("-576"); var c = Lang.isInt("6.5"); var d = Lang.isInt("@13"); var e = Lang.isInt("hello"); Result a = true, b = true, c = true, d = false, e = false max() : max() The max() function returns the largest value of two numbers. Syntax n = Lang.max(number1, number2) Exapmle var a = Lang.max(20, 40.3); var b = Lang.max(60, 59.7); Result a = 40.3 b = 60 maxInt() : maxInt() The maxInt() function returns the maximum possible integer value. Syntax n = Lang.maxInt() Exapmle var a = Lang.maxInt(); Result a = 2147483647 min() : min() The min() function returns the smallest value of two numbers. Syntax n = Lang.min(number1, number2) Exapmle var a = Lang.min(20, 40.3); var b = Lang.min(60, 59.7); Result a = 20 b = 59.7 minInt() : minInt() The minInt() function returns the minimum possible integer value. Syntax n = Lang.minInt() Exapmle var a = Lang.minInt(); Result a = -2147483648 parseFloat() : parseFloat() The parseFloat() function returns a floating-point value defined by the string value. Syntax n = Lang.parseFloat(string) Exapmle var a = Lang.parseFloat("2345.14"); var b = Lang.parseFloat(" -4.45e2 Kg"); var c = Lang.parseFloat(" +4.45e2 Kg"); var d = Lang.parseFloat("-.3 C"); var e = Lang.parseFloat(" 300 "); Result a = 2345.14 b = -4.45e2 c = 4.45e2 d = -0.3 e = 300.0 parseInt() : parseInt() The parseInt() function returns an integer defined by the string value. Syntax n = Lang.parseInt(string) Exapmle var a = Lang.parseInt("2345"); var b = Lang.parseInt("200 m/s"); Result a = 2345 b = 200 random() : random() The random() function returns a random integer between 0 and the number parameter. Syntax n = Lang.random(number) Exapmle var a = Lang.random(6.5); Result a = A random integer between 0 and 6 URL Library : URL Library escapeString() getFragment() getHost() getParameters() getPath() getPort() getQuery() getScheme() isValid() resolve() unescapeString() escapeString() : escapeString() The escapeString() function replaces special characters in a URL with an escape sequence, and return the result. Syntax n = URL.escapeString(url) Exapmle var a = URL.escapeString("http://w3Schools.com/wml/"); Result a = "http%3a%2f%2fw3Schools.com%2fwml%2f" getFragment() : getFragment() The getFragment() function returns the fragment in the url parameter. Syntax n = URL.getFragment(url) Exapmle var a = URL.getFragment("http://w3schools.com/wml#read"); var b = URL.getFragment("http://w3schools.com/wml"); Result a = "read“ b = "" getHost() : getHost() The getHost() function returns the host specified in the url parameter. Syntax n = URL.getHost(url) Exapmle var a = URL.getHost("http://www.w3schools.com/wml"); var b = URL.getHost("/wml/functions"); Result a = www.w3schools.com b = "" getParameters() : getParameters() The getParameters() function returns the parameter in the last path segment of the url parameter. Syntax n = URL.getParameters(url) Exapmle var a = URL.getParameters("http://w3schools.com/wml;tip"); var b = URL.getParameters("http://w3schools.com/wml"); Result a = "tip“ b = "" getPath() : getPath() The getPath() function returns the path specified in the url parameter. Syntax n = URL.getPath(url) Exapmle var a = URL.getPath("http://w3schools.com/wml/tips.htm"); var b = URL.getPath("http://w3schools.com"); Result a = "/wml/tips.htm“ b = "" getPort() : getPort() The getPort() function returns the port number specified in the url parameter. Syntax n = URL.getPort(url) Exapmle var a = URL.getPort("http://w3schools.com:80"); var b = URL.getPort("http://w3schools.com"); Result a = "80“ b = "" getQuery() : getQuery() The getQuery() function returns the query part in the specified URL. Syntax n = URL.getQuery(url) Exapmle var a=URL.getQuery("http://w3s.com/go.asp?name=bill"); var b=URL.getQuery("http://w3s.com"); Result a = “name=bill“ b = "" getScheme() : getScheme() The getScheme() function returns the scheme in the specified URL. Syntax n = URL.getScheme(url) Exapmle var a = URL.getScheme("http://www.w3schools.com"); var b = URL.getScheme("www.w3schools.com"); var c = URL.getScheme("ftp://www.w3schools.com"); Result a = "http“ b = "“ c = "ftp" isValid() : isValid() The isValid() function returns a boolean value that is true if the specified URL has the right syntax, and false if not. Syntax n = URL.isValid(url) Exapmle var a = URL.isValid("http://www.w3schools.com"); var b = URL.isValid("http//www.w3schools.com"); var c = URL.isValid("http://www.w3schools.com!!!!"); Result a = "true“ b = "false“ c = "false" resolve() : resolve() The resolve() function returns an absolute URL from the specified baseurl and the specified relativeurl. Syntax n = URL.resolve(baseurl, relativeurl) Exapmle var a=URL.resolve("http://w3schools.com", "/wml/n.wml"); Result a = "http://w3schools.com/wml/n.wml" unescapeString() : unescapeString() The unescapeString() function replaces the escape sequences in a URL with characters, and return the result. Syntax n = URL.unescapeString(string) Exapmle var a=URL.unescapeString("http%3a%2f%2fw3s.com%2wml"); Result a = "http://w3s.com/wml" WMLBrowser Library : WMLBrowser Library getCurrentCard() getVar() go() newContext() prev() refresh() setvar() getCurrentCard() : getCurrentCard() The getCurrentCard() function returns the relative URL of the current card. Syntax n = WMLBrowser.getCurrentCard() Exapmle var a = WMLBrowser.getCurrentCard(); Result a = "card1#note" getVar() : getVar() The getVar() function returns the value of the specified variable in the browser context. Syntax n = WMLBrowser.getVar(variable) Exapmle var a = WMLBrowser.getVar("weeks"); Result a = "52" go() : go() The go() function goes to a new card (specified by the new URL), and returns an empty string Syntax n = WMLBrowser.go(url) Exapmle var a = WMLBrowser.go(card); Result a = "" newContext() : newContext() The newContext() function clears all variables of the WML context, and returns an empty string. Syntax n = WMLBrowser.newContext() Exapmle var a = WMLBrowser.newContext(); Result a = "" prev() : prev() The prev() function tells the WML browser to go back to the previous WML card, and returns an empty string. Syntax n = WMLBrowser.prev() Exapmle var a = WMLBrowser.prev(); Result a = "" refresh() : refresh() The refresh() function refreshes the current card, and returns an empty string if the refresh succeeded, or a non-empty string if it failed. Syntax n = WMLBrowser.refresh() Exapmle var a = WMLBrowser.refresh(); Result a = "" setVar() : setVar() The setVar() function sets the value of the specified variable in the browser context, and returns true if the new value where implemented successfully, and false if not Syntax n = WMLBrowser.setVar(variable, value) Exapmle var a = WMLBrowser.setVar("weeks", 34); Result a = true String Library : String Library charAt() compare() elementAt() elements() find() format() insertAt() isEmpty() length() removeAt() replace() replaceAt() squeeze() subString() toString() trim() charAt() : charAt() The charAt() function returns a string. The string contains only one character. The character returned is the character that is placed in the position of the index parameter. Syntax n = String.charAt(string, index) Exapmle var a = String.charAt("world",2); var b = String.charAt("world",0); var c = String.charAt("world",10); Result a = "r“ b = "w“ c = "" compare() : compare() The compare() function returns 0 if the value of string1 and string2 is identical, -1 if the value of string1 is smaller than string2, and 1 if the value of string1 is larger than string2. Syntax n = String.compare(string1, string2) Exapmle var a = String.compare("world","world"); var b = String.compare("I","world"); var c = String.compare("world","I"); Result a = 0 b = -1 c = 1 elementAt() : elementAt() The elementAt() function separates the value of the string parameter into elements according to the specified separator parameter, and then returns the element with the given index. Syntax n = String.elementAt(string, index, separator) Exapmle var a= String.elementAt("Visit W3Schools today",0," "); var b= String.elementAt("Visit W3Schools today",1," "); var c= String.elementAt("Visit W3Schools today",2," "); var d= String.elementAt("Apples+Bananas",0,"+"); var e= String.elementAt("Apples+Bananas",1,"+"); var f= String.elementAt("Apples+Bananas",5,"+"); Result a = "Visit“ b = "W3Schools“ c = "today“ d = "Apples“ e = "Bananas“ f = "Bananas" elements() : elements() The elements() function returns the number of times the value specified in the separator parameter appears in a string. Syntax n = String.elements(string, separator) Exapmle var a = String.elements("Visit W3Schools!","i"); var b = String.elements("Visit W3Schools!","V"); var c = String.elements("Visit W3Schools!"," "); Result a = 2 b = 1 c = 1