You are on page 1of 3

MOBILE COMPUTING

ASSIGNMENT - 4

M3 Gate -WAP Emulator

NAME : VAISHNAVI R

REG.NO : 311520104055

CLASS : III CSE


PROGRAM

<wml>

<card id="card1" title="Pick your Age">


<do type="accept" label="Age">
<go href="#card2"/>
</do>
<p>
<select name="name">
<option value="Teen">Below 20 years</option>
<option value="Middle Age">Between 20 to 60 years</option>
<option value="Old age">Higher than 60 years</option>
</select>
</p>
</card>

<card id="card2" title="Answer">


<p>
You selected: $(name)
</p>
</card>

</wml>

OUTPUT
The code provided is a WML (Wireless Markup Language) code that creates a simple two-card
mobile page that allows the user to select their age from a dropdown list and displays the
selected option on a new page.

The code defines two cards with different IDs and titles. The first card contains a <select> tag
that creates a dropdown list with three options representing different age groups. The code also
includes a <do> tag that creates a button with a label "Age" that, when clicked, goes to the next
card with the ID of "card2".

The second card displays the selected option from the dropdown list using a variable called
"$(name)". The value of "$(name)" is replaced with the selected option value when the user
clicks the "Age" button on the first card.

The first card is titled "Pick your Age" and contains a <select> tag that creates a dropdown list
with the name "name" and three <option> tags that represent different age groups. The code also
includes a <do> tag with a "type" attribute set to "accept" and a "label" attribute set to "Age".

This creates a button that accepts the user's selection and goes to the next card when clicked. The
<go> tag with an "href" attribute set to "#card2" specifies the URL to go to the next card with an
ID of "card2".

The second card is titled "Answer" and contains a <p> tag that displays the selected option. The
variable "$(name)" is replaced with the selected value, either "Teen", "Middle Age", or "Old
age".

Overall, this WML code provides a simple example of how to create a basic mobile page with
user input and display functionality using WML tags.

You might also like