Computer Underground

  • Uploaded by: Dheeraj
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Computer Underground as PDF for free.

More details

  • Words: 371
  • Pages: 4
Creating A WML Deck In this example, we’ll start by creating a WML deck that allows us to first select a username from a list, enter in a password, then have our selections repeated back to us. This will illustrate the basic handling of user input, events, and variables all within one deck using multiple cards. Listing 1 - WMLExample.wml

<wml> <do type="accept" label="Password">

UserName: <select name="name" title="Name:">

<do type="accept" label="Results">

Password:

You entered:
Name: $(name)
Password: $(password)



As you can see, the prolog of this document contains the XML version number to be used as well as the Document Type Definition to be referenced. Following this comes the wml

document element (the deck) that contains three cards: Login, Password, and Results. Each of these cards is defined using the element. Because the Login and Password cards also define events, they use the element to define the event to be triggered. Figure 1 shows the initial card loaded in a test browser.

Figure 1 When the "accept" type of the do element is encountered, it is displayed as an option on the WAP device display (see Figures 2, 3, and 4).

Figure 2

Figure 3

Figure 4

Selecting this option causes the element to be analyzed. If you are familiar with the anchor tag () in HTML, you know that it specifies an href attribute that tells the browser where to link to if this anchor is selected. The WML element’s "href" attribute works in the same manner. As with HTML, to link to another card in the document, you simply prepend a # symbol before it. For example, to link to the Results card, we define the following element:



This Results card makes use of variables by retrieving and displaying the contents of the name and password variables. Recall that variables are substituted into a card or deck by using the following syntax:

$(variable_name)

Related Documents

Computer Underground
December 2019 31
Computer Underground
December 2019 29
Underground Lives
May 2020 16
Underground Alat.docx
June 2020 18
Underground 2009
June 2020 10
Mining Underground
June 2020 3

More Documents from ""

Computer Underground
December 2019 31
Mo 4 Iso Mgmt 2
December 2019 19
Des Haw 4
April 2020 14
Wimaxworld_2008
December 2019 24
5 Motivation
December 2019 25