2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business...

32
2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m-Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying User Location 23.3.1 E911 Act 23.3.2 Location-Identification Technologies 23.4 Wireless Marketing, Advertising and Promotions 23.5 Wireless Payment Options 23.6 Privacy and the Wireless Internet 23.7 International Wireless Communications 23.8 Wireless-Communications Technologies 23.9 WAP and WML 23.10 Phone Simulator and Setup Instructions 23.11 Creating WML Documents 23.12 WMLScript Programming 23.13 String Object Methods

Transcript of 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business...

Page 1: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc. All rights reserved.

1

Chapter 23 - Wireless Internet and m-Business

Outline23.1 Introduction23.2 M-Business23.3 Identifying User Location

23.3.1 E911 Act23.3.2 Location-Identification Technologies

23.4 Wireless Marketing, Advertising and Promotions23.5 Wireless Payment Options23.6 Privacy and the Wireless Internet23.7 International Wireless Communications23.8 Wireless-Communications Technologies23.9 WAP and WML23.10 Phone Simulator and Setup Instructions23.11 Creating WML Documents23.12 WMLScript Programming23.13 String Object Methods

Page 2: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc. All rights reserved.

2

Chapter 23 - Wireless Internet and m-Business

Outline23.14 Wireless Protocols, Platforms and Programming Languages

23.14.1 WAP 2.023.14.2 Handheld Devices Markup Languages

(HDML)23.14.2 Handheld Devices Markup Languages

(HDML)23.14.3 Compact HTML (cHTML) and i-mode23.14.4 Java and Java 2 Micro Edition (J2ME)23.14.5 Binary Run-Time Environment for

Wireless (BREW)23.14.6 Bluetooth Wireless Technology

23.15 Internet and World Wide Web Resources

Page 3: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc. All rights reserved.

3

23.4 Wireless Marketing, Advertising and Promotions

Technology Degree of Accuracy Cell of Origin (COO) Least accurate. User could be anywhere in tower’s range. Meets only Phase I of E911 Act.

Angle of Arrival (AOA) Fairly accurate. User is within the overlap of two towers’ cell sites. Used primarily in rural areas where there are fewer towers. Complies with Phase II of E911.

Time Difference of Arrival (TDOA)

Accurate. User’s location is determined by triangulating from three locations. Complies with Phase II of E911. Most effective when towers are close together.

Enhanced Observed Time Difference (E-OTD)

Accurate. User’s location is determined by triangulating from three locations. Complies with Phase II of E911.

Location Pattern Matching Accurate. User’s location is determined by analyzing multipath interference in a given area, making the method more effective for locating a device in an urban area.

Global Positioning Systems (GPS)

Highly accurate. Satellites determine a user’s location anywhere on earth. However, GPS is not as effective when the user is indoors.

Fig. 23.1 Location-identification technologies.

Page 4: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline4

Fig23_2.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 45 <!-- Fig. 23.2: fig23_2.wml -->6 <!-- Simple WML Page -->7 8 <wml>9 <card id = "index" title = "WML Title">10 <p>11 Welcome to wireless programming!12 </p>13 </card> 14 </wml>

This text will be displayed in the browser window.

Page 5: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline5

Program Output

Page 6: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline6

Program Output

Page 7: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc. All rights reserved.

7

23.11 Creating WML Documents

Fig. 23.3 Phone Information window showing an error in the deck.

List of errors in deck.

Page 8: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline8

Fig23_4.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 45 <!-- Fig. 23.4: fig23_4.wml -->6 <!-- Using local icons -->78 <wml>9 <card id = "index" title = "Icons">10 <p>11 Local Icons<br />1213 <!-- link to the second card -->14 <a href = "#card2">1516 <!-- insert the local icon -->17 <img src = "" alt = "Link" localsrc = "link" />18 </a>Link<br />19 20 <!-- link to the third card -->21 <a href = "#card3">22 <img src = "" alt = "Wrench" localsrc = "wrench" />23 </a>Wrench<br />24 25 <!--link to an external card-->26 <a href = "fig23_5.wml#card4">27 <img src = "" alt = "Football" localsrc = "football" />28 </a>Football<br />29 30 <a href = "fig23_5.wml#card5">31 <img src = "" alt = "Boat" localsrc = "boat" />32 </a>Boat33 </p>34 </card>

The text Link is a link to card2.

The text Wrench is a link to card3.

The text Football is a link to card4 in fig23_5.wml.

The boat local icon is a link to card5 in fig23_5.wml.

Page 9: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline9

Fig23_4.wml

3536 <card id = "card2" title = "Icons">37 <p>38 You chose the link!39 </p>40 </card> 4142 <card id = "card3" title = "Wrench Link">43 <p>44 You chose the wrench!45 </p>46 </card> 47 </wml>

Result of choosing the link icon.

Result of choosing the wrench icon.

Page 10: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline10

Fig23_5.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 45 <!-- Fig. 23.5: fig23_5.wml -->6 <!-- Linking to an external card -->78 <wml>9 <card id = "card4" title = "Football Link">10 <p>11 You chose the football!12 </p>13 </card> 1415 <card id = "card5" title = "Boat Link">16 <p>17 You chose the boat!18 </p>19 </card> 20 </wml>

Result of choosing the football link.

Result choosing the boat link.

Page 11: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline11

Program Output

Page 12: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline12

WelcomeDoc.wmls

1 // Fig. 23.6: welcomeDoc.wmls2 // Writing a line of text34 extern function welcome() 5 {6 // creating a browser variable and assigning it a value7 WMLBrowser.setVar( "welcome", 8 "Welcome to WMLScript programming!" );910 // refresh the display window11 WMLBrowser.refresh();12 } Method setVar creates a browser variable

welcome with the value of the string “Welcome to WMLScript programming”.

Method refresh refreshes the browser and all variable values.

Page 13: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline13

Fig23_7.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 4 5 <!-- Fig. 23.7: fig23_7.wml -->6 <!-- Printing a line of text -->78 <wml>9 <card id = "Line" title = "Line">1011 <onevent type = "onenterforward">1213 <!-- call function welcome -->14 <go href = "welcomeDoc.wmls#welcome()" />1516 </onevent>17 18 <p>19 $welcome <!-- dereference browser variable welcome -->20 </p>21 </card>22 </wml>

Dereferencing browser variable welcome displays its value.

Page 14: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline14

Program Output

Page 15: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline15

DialogPrompt.wmls

1 // Fig. 23.8: dialogPrompt.wmls2 // Printing multiple lines in a dialog34 extern function displayDialog() 5 {6 Dialogs.alert( "Welcome to\nWMLScript\nProgramming!" );7 }

The alert method displays the string passed to it in a dialog box.

Each line break character places the remaining text on the next line in the browser.

Page 16: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline16

Fig23_9.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 4 5 <!-- Fig. 23.9: fig23_9.wml -->6 <!-- Using dialogs -->78 <wml>9 <card id = "Dialog" title = "Dialog">1011 <!-- event element to execute go element -->12 <onevent type = "onenterforward"> 1314 <!-- call function displayDialog -->15 <!-- in dialogPrompt.wmls -->16 <go href = "dialogPrompt.wmls#displayDialog()" />1718 </onevent>1920 </card>21 </wml>

Setting the type attribute to onenterforward causes the action of the go element to be executed when the card is entered.

When the cars is entered, function displayDialog will be called.

Page 17: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline17

Program Output

Soft keys

Page 18: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline18

SquareNumbers.wmls

1 // Fig. 23.10: squareNumbers.wmls2 // Programmer-defined functions34 extern function count() 5 { 6 // prompt the user for a number7 var inputNumber = Dialogs.prompt( 8 "Enter a number to be squared", "" );910 // convert the number to an integer and pass11 // the number to function square12 var numberSquared = square( Lang.parseInt( inputNumber ) );1314 var outputSquare = inputNumber + " squared is " + 15 numberSquared;1617 // set the string to a browser variable and 18 // redirect the client to the card named result19 WMLBrowser.setVar( "result1", outputSquare );20 WMLBrowser.go( "#result" );21 }2223 function square( y )24 {25 return y * y;26 }

Method prompt displays a dialog box that displays a message and an input field.The first argument passed to method

prompt is the message that is displayed in the dialog.

The second argument passed to methos prompt is the default value for the input field

Call function square and pass it the value input by the user.Variable y gets the value of inputNumber.

Page 19: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline19

Fig23_11.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 45 <!-- Fig. 23.11: fig23_11.wml -->6 <!-- Squaring numbers -->78 <wml>9 <card id = "index" title = "Number Squared">1011 <!-- soft key to invoke function count -->12 <do type = "accept" label = "OK">13 <go href = "squareNumbers.wmls#count()" />14 </do>1516 <p>17 Press OK to square a number.18 </p>19 </card>2021 <card id = "result" title = "Results">2223 <!-- soft key that returns the user to the previous card->24 <do type = "accept" label = "Home">25 <prev />26 </do>2728 <p>29 $result130 </p>31 </card> 32 </wml>

This soft key calls function count when pressed.

The prev element sends the client back to the previous card.

Dereferencing variable result displays the result of the calculation.

Page 20: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline20

Program Output

Page 21: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline21

GetVariable.wmls

1 // Fig. 23.12: getVariable.wmls2 // Using the WMLBrowser object’s getVar method34 extern function getName()5 {6 var x = WMLBrowser.getVar( "username" );7 var y = x + ", thanks for visiting!";89 WMLBrowser.setVar( "result", y );10 WMLBrowser.go( "#card2" );11 }

Method getVar retrieves the value of browser variable username.

The + operator concatenates the value of x and the string “, thanks for visiting”.

Page 22: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline22

GetVar.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 45 <!-- Fig. 23.13: getVar.wml -->6 <!-- Using the WMLBrowser object’s getVar method -->78 <wml>9 <card id = "index" title = "getVar">10 <do type = "accept" label = "Run">1112 <!-- call function getName -->13 <go href = "getVariable.wmls#getName()" />1415 </do>16 17 <p>18 Enter your name:<br />1920 <!-- create input box for user input -->21 <input name = "username" value = "" />2223 </p>24 </card> 2526 <card id = "card2" title = "getVar">2728 <!-- create a soft key to return the client -->29 <!-- to the previous card -->30 <do type = "accept" label = "Back">31 <prev />32 </do>33

This soft key calls function getName when pressed.

This input field allows the user to enter a username.

This soft key sends the client to the previous card.

Page 23: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline23

GetVar.wml

Program Output

34 <p>35 $result <!-- dereference browser variable result -->36 </p>37 </card> 38 </wml> Dereferencing browser variable result displays

the results of the script.

Page 24: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline24

FunctionSet.wmls

1 // Fig. 23.14: functionSet.wmls 2 // Demonstrating String object methods34 extern function stringMethods() 5 {6 var string1 = "";7 var empty;89 // test if string1 is empty10 if ( String.isEmpty( string1 ) )11 empty = "string1 is empty";12 else13 empty = "string1 is not empty";1415 WMLBrowser.setVar( "emptyString1", empty );1617 // format the string to have 12 spaces between 18 // "Wireless" and "Web"19 string1 = String.format( "Wireless%15s", "Web" );2021 WMLBrowser.setVar( "formatString1", string1 );2223 // squeeze the string until one space is left24 string1 = String.squeeze( string1 );2526 WMLBrowser.setVar( "squeezeString1", string1 );2728 // use method element to count the elements in string129 // use the toString method to convert the integer to 30 // a string31 var count = String.toString( String.elements( string1, " ") );3233 WMLBrowser.setVar( "elementsString1", count );34

The value of variable string1 begins as an empty string.

Method isEmpty determines if the string is empty and returns true if it is.

After invoking the format method, the value of string1 will be “Wireless Web” with 12 spaces separating the two words.

Method squeeze eliminates all consecutive whitespace leaving one space between Wireless and Web.

Method elements determines the amount of elements in a string separated by a space (the second argument).Method toString converts the integer value

returns by method elements to a string.

Page 25: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline25

FunctionSet.wmls

35 // find string starting at index 8 and ending with a space36 var string1Element = String.elementAt( string1, 8, " " );3738 WMLBrowser.setVar( "elementAtString1", string1Element );3940 // get the length of string141 var length = String.length( string1 );42 43 // insert "Book" at the end of string144 string1 = String.insertAt( string1, "Book", length, " " );4546 WMLBrowser.setVar( "insertAtString1", string1 );4748 // replace "Web" with "Deitel" where "Web" has an 49 // index of 150 string1 = String.replaceAt( string1, "Deitel", 1, " " );51 52 WMLBrowser.setVar( "replaceAtString1", string1 );5354 // remove "Wireless" from string155 string1 = String.removeAt( string1, 0, " " );5657 WMLBrowser.setVar( "removeAtString1", string1 ); 58 WMLBrowser.go( "#card2" ); 59 }

Method elementAt will return a substring from the value of string1 starting at index 8 and ending at a space.

Method length returns the number of characters in string1 as an integer.

Method replaceAt removes “Web” from string1 and replaces it with the string “Deitel” (Wireless Deitel Book).

Method insertAt inserts the string “Book” at the end of the value of string1 (Wireless Web Book).

Method removeAt removes the string “Wireless” from the value of string1 leaving “Deitel Book”.

Page 26: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline26

StringMisc.wml

1 <?xml version = "1.0"?>2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"3 "http://www.wapforum.org/DTD/wml12.dtd"> 4 5 <!-- Fig. 23.15: stringMisc.wml -->6 <!-- WML document that references stringMisc.wmls -->78 <wml>910 <card id = "index" title = "strings">11 <do type = "accept" label = "Run">1213 <!-- call function stringMethods in functionSet.wmls -->14 <go href = "functionSet.wmls#stringMethods()" />1516 </do>17 18 <p>19 Click Run to execute the script.20 </p>21 </card> 2223 <card id ="card2" title = "strings">24 <do type = "accept" label = "Run">25 26 <!-- redirect the user to the next card to -->27 <!-- display further results -->28 <go href = "#card3" />2930 </do>31

Page 27: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline27

StringMisc.wml

32 <p>33 isEmpty method:<br />34 35 <!-- dereference browser variable emptyString1 -->36 $emptyString13738 </p>39 </card>40 41 <card id = "card3" title = "strings">42 <do type = "accept" label = "Run">4344 <!-- redirect the user to the next card to -->45 <!-- display further results -->46 <go href = "#card4" />4748 </do>49 50 <p>51 String.format method:<br />5253 <!-- dereference browser variable formatString1 -->54 $formatString155 </p>56 </card> 57 58 <card id = "card4" title = "strings">59 <do type = "accept" label = "Run">6061 <!-- redirect the user to the next card to -->62 <!-- display further results -->63 <go href = "#card5" />64 </do>65

Display results of invoking method isEmpty.

Display result of invoking method format.

Page 28: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline28

StringMisc.wml

66 <p>67 String.squeeze method:<br />6869 <!-- dereference browser variable squeezeString1 -->70 $squeezeString171 </p>7273 </card> 74 75 <card id = "card5" title = "strings">76 <do type = "accept" label = "Run">7778 <!-- redirect the user to the next card to -->79 <!-- display further results -->80 <go href = "#card6" />81 </do>82 83 <p>84 String.elements method:<br />8586 <!-- dereference browser variable elementsString1 -->87 $elementsString188 </p>89 </card> 90 91 <card id = "card6" title = "strings">92 <do type = "accept" label = "Run">9394 <!-- redirect the user to the next card to -->95 <!-- display further results -->96 <go href = "#card7" />97 </do>98

Display results of invoking method squeeze.

Display result of invoking method elements.

Page 29: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline29

StringMisc.wml

99 <p>100 String.elementAt method:<br />101102 <!-- dereference browser variable elementAtString1 -->103 $elementAtString1104 </p>105 </card> 106 107 <card id = "card7" title = "strings">108 <do type = "accept" label = "Run">109110 <!-- redirect the user to the next card to -->111 <!-- display further results -->112 <go href = "#card8" />113 </do>114 115 <p>116 String.insertAt method:<br />117118 <!-- dereference browser variable insertAtString1 -->119 $insertAtString1120 </p>121 </card> 122 123 <card id = "card8" title = "strings">124 <do type = "accept" label = "Run">125126 <!-- redirect the user to the next card to -->127 <!-- display further results -->128 <go href = "#card9" />129 </do>130

Display results of invoking method elementAt.

Display result of invoking method insertAt.

Page 30: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline30

StringMisc.wml

131 <p>132 String.replaceAt method:<br />133134 <!-- dereference browser variable replaceAtString1 -->135 $replaceAtString1136 </p>137 </card> 138 139 <card id = "card9" title = "strings">140 <do type = "accept" label = "Home">141142 <!-- redirect the user to the first card -->143 <go href = "#index" />144 </do>145 146 <p>147 String.removeAt method:<br />148149 <!-- dereference browser variable removeAtString1 -->150 $removeAtString1151 </p>152 </card> 153 </wml>

Display results of invoking method replaceAt.

Display result of invoking method removeAt.

Page 31: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline31

Program Output

Page 32: 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 23 - Wireless Internet and m- Business Outline 23.1 Introduction 23.2 M-Business 23.3 Identifying.

2001 Prentice Hall, Inc.All rights reserved.

Outline32

Program Output