 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.

Slides:



Advertisements
Similar presentations
Chapter 7 JavaScript: Introduction to Scripting. Outline Simple Programs Objects and Variables Obtaining User Input with prompt Dialogs – –Dynamic Welcome.
Advertisements

 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 24 - VBScript Outline 24.1 Introduction 24.2 Operators 24.3 Data Types and Control Structures.
The Web Warrior Guide to Web Design Technologies
 2000 Prentice Hall, Inc. All rights reserved. Chapter 2 - Introduction to C Programming Outline 2.1Introduction 2.2A Simple C Program: Printing a Line.
Page 1 of 26 Javascript/Jscript Ch 7,8,9,10 Vadim Parizher Computer Science Department California State University, Northridge Spring 2003 Slides from.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic JavaScript: Introduction to Scripting.
1 Wireless Internet & m-Business Objectives :  To provide an overview of wireless technologies and applications  To examine various wireless standards,platforms.
1 Outline 13.1Introduction 13.2A Simple Program: Printing a Line of Text in a Web Page 13.3Another JavaScript Program: Adding Integers 13.4Memory Concepts.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Mathematical Operators  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course. Introduction to Computers and Programming in.
Introduction to scripting
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 8 - JavaScript: Control Structures I Outline 8.1 Introduction 8.2 Algorithms 8.3 Pseudocode 8.4.
JavaScript: Control Structures September 27, 2005 Slides modified from Internet & World Wide Web: How to Program (3rd) edition. By Deitel, Deitel,
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to C++ Programming Outline Introduction to C++ Programming A Simple Program: Printing a.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
WEB DESIGN AND PROGRAMMING Introduction to Javascript.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
WML II (“Son of WML”) WML WMLScript. WML - A Quick Review Document structure ,... Text and image controls ...,,..., Navigation controls ,,, Events.
By Amisha Pardasani. Contents Introduction to Wireless Application Protocol Introduction to Wireless Markup Language WML Formatting Links and Images Input.
Lectured By: Vivek Dimri Assistant Professor, CSE Dept. SET, Sharda University, Gr. Noida.
CIS 375—Web App Dev II WAP. 2 Introduction to WAP WAP ________________________ is an application communication protocol that uses a ______ Browser in.
WML Programming. What is WML WML Programming Wireless mark up language based on XML. Purpose:  to specify user interface behavior and  display contents.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 10 - JavaScript: Functions Outline 10.1 Introduction 10.2 Program Modules in JavaScript 10.3.
WML What is WML? WML stands for Wireless Markup Language. It is a mark-up language inherited from HTML, but WML is based on XML, so it is much stricter.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 18 - WMLScript: Control Structures II Outline 18.1 Introduction 18.2 Essentials of Counter-Controlled.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 2 Chapter 2 - Introduction to C Programming.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 17 - WMLScript: Control Structures I Outline 17.1 Introduction 17.2 Algorithms 17.3 Pseudocode.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 8 - JavaScript: Control Structures I Outline 8.1 Introduction 8.2 Algorithms 8.3 Pseudocode 8.4.
Dr. Qusai Abuein1 Internet & WWW How to program Chap.(6) JavaScript:Introduction to Scripting.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
 2000 Deitel & Associates, Inc. All rights reserved. Outline 8.1Introduction 8.2A Simple Program: Printing a Line of Text in a Web Page 8.3Another JavaScript.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
JavaScript, Fourth Edition
1 Chapter 3 – JavaScript Outline Introduction Flowcharts Control Structures if Selection Structure if/else Selection Structure while Repetition Structure.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 13 - Wireless Markup Language (WML): Part I Outline 13.1 Introduction 13.2 Editing WML 13.3 First.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
JavaScript 1 COE 201- Computer Proficiency. Introduction JavaScript scripting language ▫Originally created by Netscape ▫Facilitates disciplined approach.
WML & WML Script Presented by Kelvin Liu 01/06/2000.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Part:2.  Keywords are words with special meaning in JavaScript  Keyword var ◦ Used to declare the names of variables ◦ A variable is a location in the.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing a Line of Text in a Web Page 7.3 Another JavaScript.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Adapted from  2004 Prentice Hall, Inc. All rights reserved. 5 th and 4 th ed: Chapters 6,7,8 SY306 Web and Databases for Cyber Operations SlideSet #6:
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
 2003 Prentice Hall, Inc. All rights reserved Basics of a Typical C++ Environment C++ systems –Program-development environment –Language –C++
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 16 - WMLScript Functions Outline 16.1 Introduction 16.2 Program Modules in WMLScript 16.3 Programmer-Defined.
INTERNET APPLICATIONS CPIT405 JavaScript Instructor: Rasha AlOmari
JavaScript: Control Structures I Outline 1 Introduction 2 Algorithms 3 Pseudocode 4 Control Structures 5 if Selection Structure 6 if/else Selection Structure.
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 JavaScript.
Chapter 6 JavaScript: Introduction to Scripting
Chapter 19 PHP Part III Credits: Parts of the slides are based on slides created by textbook authors, P.J. Deitel and H. M. Deitel by Prentice Hall ©
Chapter 13 - JavaScript/JScript: Introduction to Scripting
Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
JavaScript: Introduction to Scripting
WEB PROGRAMMING JavaScript.
Chapter 23 - Wireless Internet and m-Business
Chapter 7 - JavaScript: Introduction to Scripting
JavaScript: Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
Chapter 7 - JavaScript: Introduction to Scripting
Presentation transcript:

 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 E911 Act 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 Phone Simulator and Setup Instructions Creating WML Documents WMLScript Programming String Object Methods

 2001 Prentice Hall, Inc. All rights reserved. 2 Chapter 23 - Wireless Internet and m- Business Outline Wireless Protocols, Platforms and Programming Languages WAP Handheld Devices Markup Languages (HDML) Compact HTML (cHTML) and i-mode Java and Java 2 Micro Edition (J2ME) Binary Run-Time Environment for Wireless (BREW) Bluetooth Wireless Technology Internet and World Wide Web Resources

 2001 Prentice Hall, Inc. All rights reserved Wireless Marketing, Advertising and Promotions

 2001 Prentice Hall, Inc. All rights reserved. Outline 4 Fig23_2.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " Welcome to wireless programming! This text will be displayed in the browser window.

 2001 Prentice Hall, Inc. All rights reserved. Outline 5 Program Output

 2001 Prentice Hall, Inc. All rights reserved. Outline 6 Program Output

 2001 Prentice Hall, Inc. All rights reserved Creating WML Documents Fig Phone Information window showing an error in the deck. List of errors in deck.

 2001 Prentice Hall, Inc. All rights reserved. Outline 8 Fig23_4.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " Local Icons Link Wrench Football Boat 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 9 Fig23_4.wml You chose the link! You chose the wrench! Result of choosing the link icon. Result of choosing the wrench icon.

 2001 Prentice Hall, Inc. All rights reserved. Outline 10 Fig23_5.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " You chose the football! You chose the boat! Result of choosing the football link. Result choosing the boat link.

 2001 Prentice Hall, Inc. All rights reserved. Outline 11 Program Output

 2001 Prentice Hall, Inc. All rights reserved. Outline 12 WelcomeDoc.wmls 1// Fig. 23.6: welcomeDoc.wmls 2// Writing a line of text 3 4extern function welcome() 5{ 6 // creating a browser variable and assigning it a value 7 WMLBrowser.setVar( "welcome", 8 "Welcome to WMLScript programming!" ); 9 10 // refresh the display window 11 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 13 Fig23_7.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " $welcome Dereferencing browser variable welcome displays its value.

 2001 Prentice Hall, Inc. All rights reserved. Outline 14 Program Output

 2001 Prentice Hall, Inc. All rights reserved. Outline 15 DialogPrompt.wml s 1// Fig. 23.8: dialogPrompt.wmls 2// Printing multiple lines in a dialog 3 4extern 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 16 Fig23_9.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 17 Program Output

 2001 Prentice Hall, Inc. All rights reserved. Outline 18 SquareNumbers.wm ls 1// Fig : squareNumbers.wmls 2// Programmer-defined functions 3 4extern function count() 5{ 6 // prompt the user for a number 7 var inputNumber = Dialogs.prompt( 8 "Enter a number to be squared", "" ); 9 10 // convert the number to an integer and pass 11 // the number to function square 12 var numberSquared = square( Lang.parseInt( inputNumber ) ); var outputSquare = inputNumber + " squared is " + 15 numberSquared; // set the string to a browser variable and 18 // redirect the client to the card named result 19 WMLBrowser.setVar( "result1", outputSquare ); 20 WMLBrowser.go( "#result" ); 21} 22 23function 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 19 Fig23_11.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " Press OK to square a number $result 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 20 Program Output

 2001 Prentice Hall, Inc. All rights reserved. Outline 21 GetVariable.wmls 1// Fig : getVariable.wmls 2// Using the WMLBrowser object’s getVar method 3 4extern function getName() 5{ 6 var x = WMLBrowser.getVar( "username" ); 7 var y = x + ", thanks for visiting!"; 8 9 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”.

 2001 Prentice Hall, Inc. All rights reserved. Outline 22 GetVar.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " Enter your name: 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 23 GetVar.wml Program Output $result Dereferencing browser variable result displays the results of the script.

 2001 Prentice Hall, Inc. All rights reserved. Outline 24 FunctionSet.wmls 1// Fig : functionSet.wmls 2// Demonstrating String object methods 3 4extern function stringMethods() 5{ 6 var string1 = ""; 7 var empty; 8 9 // test if string1 is empty 10 if ( String.isEmpty( string1 ) ) 11 empty = "string1 is empty"; 12 else 13 empty = "string1 is not empty"; WMLBrowser.setVar( "emptyString1", empty ); // format the string to have 12 spaces between 18 // "Wireless" and "Web" 19 string1 = String.format( "Wireless%15s", "Web" ); WMLBrowser.setVar( "formatString1", string1 ); // squeeze the string until one space is left 24 string1 = String.squeeze( string1 ); WMLBrowser.setVar( "squeezeString1", string1 ); // use method element to count the elements in string1 29 // use the toString method to convert the integer to 30 // a string 31 var count = String.toString( String.elements( string1, " ") ); 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.

 2001 Prentice Hall, Inc. All rights reserved. Outline 25 FunctionSet.wmls 35 // find string starting at index 8 and ending with a space 36 var string1Element = String.elementAt( string1, 8, " " ); WMLBrowser.setVar( "elementAtString1", string1Element ); // get the length of string1 41 var length = String.length( string1 ); // insert "Book" at the end of string1 44 string1 = String.insertAt( string1, "Book", length, " " ); WMLBrowser.setVar( "insertAtString1", string1 ); // replace "Web" with "Deitel" where "Web" has an 49 // index of 1 50 string1 = String.replaceAt( string1, "Deitel", 1, " " ); WMLBrowser.setVar( "replaceAtString1", string1 ); // remove "Wireless" from string1 55 string1 = String.removeAt( string1, 0, " " ); 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”.

 2001 Prentice Hall, Inc. All rights reserved. Outline 26 StringMisc.wml 1 2<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" 3 " Click Run to execute the script

 2001 Prentice Hall, Inc. All rights reserved. Outline 27 StringMisc.wml isEmpty method: $emptyString String.format method: $formatString Display results of invoking method isEmpty. Display result of invoking method format.

 2001 Prentice Hall, Inc. All rights reserved. Outline 28 StringMisc.wml String.squeeze method: $squeezeString String.elements method: $elementsString Display results of invoking method squeeze. Display result of invoking method elements.

 2001 Prentice Hall, Inc. All rights reserved. Outline 29 StringMisc.wml String.elementAt method: $elementAtString String.insertAt method: $insertAtString Display results of invoking method elementAt. Display result of invoking method insertAt.

 2001 Prentice Hall, Inc. All rights reserved. Outline 30 StringMisc.wml String.replaceAt method: $replaceAtString String.removeAt method: $removeAtString Display results of invoking method replaceAt. Display result of invoking method removeAt.

 2001 Prentice Hall, Inc. All rights reserved. Outline 31 Program Output

 2001 Prentice Hall, Inc. All rights reserved. Outline 32 Program Output