WML, WMLS More acronyms than you can shake a stick at!

Slides:



Advertisements
Similar presentations
The Internet.
Advertisements

Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
HTML 5 and CSS 3, Illustrated Complete Unit L: Programming Web Pages with JavaScript.
Lesson 12- Unit L Programming Web Pages with JavaScript.
The Web Warrior Guide to Web Design Technologies
CHAPTER 30 THE HTML 5 FORMS PROCESSING. LEARNING OBJECTIVES What the three form elements are How to use the HTML 5 tag to specify a list of words’ form.
Links and Comments.
Copyright © Gavin McArdell WML Training Course Gavin McArdell.
Chapter 4 Planning Site Navigation Principles of Web Design, 4 th Edition.
Tutorial Holdings Management Adding, Editing, and Assigning Notes support.ebsco.com.
Web Development & Design Foundations with XHTML Chapter 14 Key Concepts.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Modern JavaScript Develop And Design Instructor’s Notes Chapter 2- JavaScript in Action Modern JavaScript Design And Develop Copyright © 2012 by Larry.
Forms, Validation Week 7 INFM 603. Announcements Try placing today’s example in htdocs (XAMPP). This will allow you to execute examples that rely on PHP.
CST JavaScript Validating Form Data with JavaScript.
Online Registration Software A Robust, High Quality Web Based Solution that Streamlines your Organization! (612) (866)
 Internet vs WWW  Pages vs Sites  How the Internet Works  Getting a Web Presence.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
WML II (“Son of WML”) WML WMLScript. WML - A Quick Review Document structure ,... Text and image controls ...,,..., Navigation controls ,,, Events.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Lectured By: Vivek Dimri Assistant Professor, CSE Dept. SET, Sharda University, Gr. Noida.
WAP and WML The Wireless Application Protocol  WAP architecture  WML document structure  WML syntax Basic document syntax Layout Text formatting Images.
WML Wireless Markup Language Presented by: Richa Saxena Roll no
CIS 375—Web App Dev II WAP. 2 Introduction to WAP WAP ________________________ is an application communication protocol that uses a ______ Browser in.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
1 JavaScript. 2 What’s wrong with JavaScript? A very powerful language, yet –Often hated –Browser inconsistencies –Misunderstood –Developers find it painful.
CSS Class 7 Add JavaScript to your page Add event handlers Validate a form Open a new window Hide and show elements Swap images Debug JavaScript.
Week 9 PHP Cookies and Session Introduction to JavaScript.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
What is Java Script? An extension to HTML. An extension to HTML. Allows authors to incorporate some functionality in their web pages. (without using CGI.
Instructors begin using McGraw-Hill’s Homework Manager by creating a unique class Web site in the system. The Class Homepage becomes the entry point for.
JavaScript, Fourth Edition
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.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
Microsoft ® Office SharePoint ® Server 2007 Training Excel Services II: Requirements, recommendations, and permissions [Your company name] presents:
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
76 © 1998, 1999, 2000 David T. Gray, Howard Duncan, Jane Kernan Frames When displaying information in a browser, it is sometimes useful to divide the display.
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
XP 1 New Perspectives on XML Binding XML Data with Internet Explorer.
JavaScript - A Web Script Language Fred Durao
 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.
Week 4 Planning Site Navigation. 2 Creating Usable Navigation Provide enough location information to let the user answer the following navigation questions:
FORMS. Forms are used to receive information from the web surfer, such as: their name, address, credit card, etc. Form fields are objects that allow.
1 JavaScript
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
XP Tutorial 8 Adding Interactivity with ActionScript.
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
Website design and structure. A Website is a collection of webpages that are linked together. Webpages contain text, graphics, sound and video clips.
WML & WML Script Presented by Kelvin Liu 01/06/2000.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
The Internet. Important Terms Network Network Internet Internet WWW (World Wide Web) WWW (World Wide Web) Web page Web page Web site Web site Browser.
Tutorial 11 1 JavaScript Operators and Expressions.
PHP Form Processing * referenced from
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Dreamweaver – Setting up a Site and Page Layouts Web Design Section 7-2 Part or all of this lesson was adapted from the University of Washington’s “Web.
Chapter 4 Frames and Cascading Style Sheets. Frames Frames divide a browser window into two or more separate pieces or panes, with each pane containing.
Day 22, Slide 1 CSE 103 Day 22 Non-students: Please logout by 10:12. Students:
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
Section 10.1 Define scripting
Chapter 5 Validating Form Data with JavaScript
Unit M Programming Web Pages with
Data Virtualization Tutorial… CORS and CIS
Presentation transcript:

WML, WMLS More acronyms than you can shake a stick at!

Overview Fibonacci re-visited WML  More samples  Templates, access control, and comments WMLS  Initialisation control and strings

The Fibonacci Sequence The Fibonacci Sequence is a sequence of numbers where each number is the sum of the previous two.  The Fibonacci Sequence was originally devised by a fellow named Fibonacci (surprise) in the 1600’s to model the population growth from a pair of immortal rabbits.  His question was, if every month every pairing of rabbits produced one more rabbit, could he predict how many rabbits he would have after a certain number of months? This research is of key interest to rabbits and French chefs everywhere.  We’ll write Fib(n) for “The number of Fibonacci rabbits in month n”.

The Fibonacci Sequence  In the first two months, Fib collected rabits: Fib(1) = 1 Fib(2) = 1  During month three he introduced the two rabbits: Fib(3) = 2 =  In month four, the two produced one more rabbit: Fib(4) = 3 =  In month five, the three produced two more: Fib(5) = 5 =  In month six, the five produced three more: Fib(6) = 8 = 5 + 3

The Fibonacci Sequence In general, each month, Fib(month) is equal to Fib(the previous month) plus Fib(the month before that): Fib(1) = 1 Fib(2) = 1 Fib(n) = Fib(n-1) + Fib(n-2) How would you translate this into code? (Rhetorical question. Answer it in the homework, not now.)

WML - Combining approaches Let’s look at combining some of what we’ve seen. How would you write a page that let the user choose an image? We’ll need:  An tag to display the picture;  and tags to pick;  some ’s to contain the content;  one to hold them all, and in the bind them.

WML <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" " Today's weather : Sunny Partly cloudy Cloudy Rainy

WML How did the user’s choice wind up being shown?  Each time the user clicked an tag, that had an onpick event handler. The onpick reloaded the page.  Because each also had a value attribute, that value was assigned to the tag’s variable.  The tag’s variable, $(name), was the file path we used for the tag.  So each time the user clicked, it changed the value of $(name) and refreshed the card; which changed the value used in the src attribute of the tag; which changed the picture that was being displayed.  An interesting note is that the tag picks its value from the first tag, so we get an image showing up on first load.

WML The tag meets the tag:  You can add an tag to an tag to enhance the onpick behavior: Sunny... This is an effective way of dealing with the fact that the onpick attribute only takes a URL.

WML - Access control It’s always possible to type in a URL manually.  Wouldn’t it suck if your e-banking web site had a password-check page that forwarded the user to the “transfer your money” page, and the user could just type in the URL for the money-transfer page without checking their password? and  The tag contains info about a document. The tag belongs in a document’s tag.  The tag limits the domain and filepath that the user can come from to get to this tag: (from the documentation at phone.com:) domain - The URL domain of other decks that can access cards in this deck. The default value is the domain of the current deck. path - The URL root of other decks that can access cards in the deck. The default value is "/" (the root path of the current deck) which lets any deck within the specified domain access this deck.

WML - Access control Access-control example:... This would define a document which could only be reached by clicking links in documents downloaded from Luton’s web server; you couldn’t link to the document from anyplace else.

WML - Comments In WMLScript, comments can be either  // single-line comments, or  /* multi-line comments */ exactly like C++ or Java.  There’s no JavaDoc (tm) in WML. To write comments in WML, use the markers.

WML Script for initialisation Last week we saw that you could initialise the value of a variable with the onenterforward event:  This can be problematic if you want to change the value of $(Foo) in another card and then the user clicks forward to the first card again (following a link forward, as opposed to hitting the Prev button to go back.)

WML Script for initialisation An example of things going wrong: myVar = $(myVar) Click for second card myVar = $(myVar) Click for first card Here the value of myVar will be changed every time the phone loads card1 or card2. That’s not a bug; it’s a feature. But what if you wanted to preserve the change you made in card2, but still have a valid value coming into card1?

WML Script for initialisation One way to fix things would be to add an ‘initialisation’ card at the front of the document: myVar = $(myVar) Click for second card <card id="card2" Here the value of myVar will be changed every time the phone loads card2, but only once before it loads card1. So the change made in card2 is preserved.

WML Script for initialisation Another solution to the same problem would be to call a WML Script function: myVar = The WML Script can actually test the var: extern function init() { if (!String.compare(WMLBrowser.getVar("myVar"), "")) WMLBrowser.setVar("myVar", "first card (from WMLS)"); WMLBrowser.refresh(); } This way the var is only initialised once.

WML Script - Strings A few words about strings in WML Script:  A “String” is a sequence of characters--letters and numbers-- like “bob the string” or “number : 1234” or  The WMLS String Library provides a host of functions to manipulate Strings. String.compare(S1, S2) : Test for equality  compare(s1,s2) will actually test whether two strings are different. So if (compare(s1,s2))... is testing whether s1 != s2.  To test whether s1 equals s2, use !compare(s1,s2).  Remember that comparison is case-sensitive!