0% found this document useful (0 votes)
5 views

Mobile computing file

The document outlines a series of experiments conducted in a Mobile Computing Lab, focusing on WAP (Wireless Application Protocol) using WML (Wireless Markup Language). Each experiment includes a specific aim, code snippets, and expected outputs related to various functionalities such as displaying cards, text formatting, creating tables, and handling user inputs. The document serves as a practical guide for students to learn and implement WAP applications.

Uploaded by

abhinavpaul54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Mobile computing file

The document outlines a series of experiments conducted in a Mobile Computing Lab, focusing on WAP (Wireless Application Protocol) using WML (Wireless Markup Language). Each experiment includes a specific aim, code snippets, and expected outputs related to various functionalities such as displaying cards, text formatting, creating tables, and handling user inputs. The document serves as a practical guide for students to learn and implement WAP applications.

Uploaded by

abhinavpaul54
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

GURU TEGH BAHADUR INSTITUTE OF

TECHNOLOGY,
SUBHASH NAGAR, NEW DELHI

MOBILE COMPUTING LAB


(ETIT-453)
---------------------------------------

Name ANURAG SINGH


Branch B.TECH – IT(1)
Year 4th YEAR - 8 SEMESTER
Enrolment Number 01413203120
Class Serial Number 14
INDEX

S.No TOPIC
1 WAP in WML to display a simple card.

2 WAP in WML to display a deck of three cards.

3 WAP in WML for text formatting.

4 WAP in WML for constructed simple Table.

5 WAP in WML using line break element to create list.

6 WAP in WML using links with simple deck.

7 WAP in WML for comparing the history stack verses


relative links for backward navigation.

8 WAP in WML to load an image.

9 WAP in WML to display effect of WRAP and


NO WRAP mode in paragraph.
10 WAP in WML to create a screen for username and
password (using setvar and input tags)

11 WAP in WML to generate animation using ontimer event.

12 WAP in WML to make address book(make index


containing the names which should have links to see the
details.
13 Create a WAPsite by using WMLScript and WML: WAP
in WML to create a page displaying 4 types of food and
on selecting a particular one it shows the name of
restaurant where you can get best food of that type. (using
setvar, select, option tags and onpick, onenterforward
event).
EXPERIMENT - 1

AIM:

WAP in WML to display a simple card.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="one" title="MY FIRST PAGE">
<p align="center">
<big><b>GURU TEGH BAHADUR INSTITUTE OF
TECHNOLOGY</b></big><br/>C-SUBHASH NAGAR
</p>
</card>
</wml>

OUTPUT OF EXPERIMENT 1
EXPERIMENT - 2

AIM:

WAP in WML to display a deck of three cards.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>
<template>
<do type="prev"><prev/></do>
</template>
<card id="card1" title="first card">
<do type="accept" label="Next">
<go href="#card2"/>
</do>
<p align="center">
<big><b>Welcome to First Card</b></big></p>
</card>

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


<do type="accept" label="Next">
<go href="#card3"/>
</do>
<p align="center">
<big><b>Welcome to Second Card</b></big></p>
</card>

<card id="card3" title="third card">


<do type="prev" label="back">
<go href="#card1"/>
</do>
<p align="center">
<big><b>Welcome to third Card</b></big></p>
</card>
</wml>
OUTPUT OF EXPERIMENT 2
EXPERIMENT - 3

AIM:

WAP in WML for text formatting.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>

<card id="card1" title="TEXT FORMATTING">

<p align="center">-rmal text <br/>


<em>Emphasised text</em><br/>
<b>Bold text</b><br/>
<i>Italic text</i><br/>
<big>Large text</big><br/>
<small>Small text</small><br/>

</p>
</card>
</wml>
OUTPUT OF EXPERIMENT 3
EXPERIMENT - 4

AIM:
WAP in WML for constructing a simple table.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card1" title="MY FIRST TABLE">
<p align="center">
<big><b>Student Information</b></big>
<table align="center" columns="4" id="table1">
<tr>
<td><big><b>S.-</b></big></td>
<td><big><b>Enroll.-</b></big></td>
<td><big><b>Name</b></big></td>
<td><big><b>Optional Subject</b></big></td></tr>
<tr>
<td>1.</td>
<td>0621503107</td>
<td>ANKITA</td>
<td>COMPILER</td> </tr>
<tr>
<td>2.</td>
<td>0751503107</td>
<td>HIMANSHU MITTAL</td>
<td>RET</td> </tr>
<tr>
<td>3.</td>
<td>0781503107</td>
<td>ANKITA GUPTA</td>
<td>RET</td>
</tr>
<tr>
<td>4.</td>
<td>0851503107</td>
<td>MEGHA DALMIA</td>
<td>RET</td></tr>
</table>
</p>
</card>
</wml>
OUTPUT OF EXPERIMENT 4
EXPERIMENT - 5

AIM:

WAP in WML using line break element to create list.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>
<card id="card1" title="List using Line Break">
<p align="center">
<big><b><i>LIST OF MC PRACTICALS</i></b></big>
<big>1.Simple Card</big>
<br/>
<big>2.Deck of three cards</big>
<br/>
<big>3.Text Formatting</big>
<br/>
<big>4.Create simple Table</big>
<br/>
<big>5.List using line break</big>
<br/>
<big>6.Using links with simple decks</big>
</p>
</card>

</wml>
OUTPUT OF EXPERIMENT 5
EXPERIMENT - 6

AIM:

WAP in WML using links with simple deck.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>
<card id="card1" title="first card">
<p align="center">
<big><b>Welcome to First Card</b></big>
<a href="#card2">NEXT CARD</a>
</p>
</card>

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


<p align="center">
<big><b>Welcome to Second Card</b></big>
<a href="#card1">NEXT CARD</a>
</p>
</card>

</wml>
OUTPUT OF EXPERIMENT 6
EXPERIMENT - 7

AIM:

WAP in WML for comparing the history stack versus relative link for backward
navigation.

CODE1: (USING HISTORY STACK)


<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>

<template>
<do type="prev" label="historystack"><prev/></do>
</template>

<card id="card1" title="first card">


<do type="prev" label="historystack"><-op/></do>
<do type="accept" label="Next">
<go href="#card2"/></do>
<p align="center">
<big><b>Welcome to First Card</b></big></p>
</card>

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


<do type="accept" label="Next">
<go href="#card3"/> </do>
<p align="center">
<big><b>Welcome to Second Card</b></big></p>
</card>

<card id="card3" title="third card">


<p align="center">
<big><b>Welcome to third Card</b></big></p>
</card>
</wml>
OUTPUT OF EXPERIMENT 7 (CODE1)
CODE2: (USING RELATIVE LINK)

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>

<card id="card1" title="first card">


<p align="center">
<big><b>Welcome to First Card</b></big>
<a href="#card2">NEXT CARD</a>
</p>
</card>

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


<p align="center">
<big><b>Welcome to Second Card</b></big>
<a href="#card1">PREVIOUS CARD<br/></a>
<a href="#card3">NEXT CARD</a>
</p>
</card>

<card id="card3" title="third card">


<p align="center">
<big><b>Welcome to Third Card</b></big>
<a href="#card2">PREVIOUS CARD</a>
</p>
</card>

</wml>
OUTPUT OF EXPERIMENT 7 (CODE2)
EXPERIMENT - 8

AIM:

WAP in WML to load an image

CODE
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card title="Image">
<p>
An image:
<img src="mobidoll.wbmp" alt="Stickman"/>
</p>
</card>
</wml>
OUTPUT OF EXPERIMENT 8
EXPERIMENT - 9

AIM:

WAP in WML to display effect of WRAP and - WRAP mode in paragraph.

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>
<card id="card1" title="Card #1">
<p align="center"><big><b>Without Wrap</b></big></p>
<p mode="-wrap">Hi this is ANKITA. I am doing an experiment in WML to display text
using mode "-wrap"</p>
<p align="center"><big><b>With Wrap</b></big></p>
<p mode="wrap">And -w I am displaying the text using mode "wrap". you can observe
the difference</p>
</card>
</wml>
OUTPUT OF EXPERIMENT 9
EXPERIMENT - 10

AIM:

WAP in WML to create a screen for username and password (using setvar and
input tags)

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>

<card id="card1" title="input" newcontext="true">


<p>
<br/>

Enter Name:
<input name="username"/>

Enter Password:
<input name="password" type="password"/>

<br/>
<do type="accept" label="info">
<go href="#card2"/>
</do>
</p>
</card>

<card id="card2" title="your information">


<p>

Values entered by you are:


<br/>
Username= $username
<br/>
Password= $password

</p>
</card>
</wml>
OUTPUT OF EXPERIMENT 10
EXPERIMENT - 11

AIM:

WAP in WML to display an animation effect using “ontimer” event.

CODE:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>

<card id="card1" title="Image">


<onevent type="ontimer">
<go href="#card2"/>
</onevent>
<timer value=".01"/>
<p align="center" >
<img src="u.wbmp" alt=""/>
</p>
</card>

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


<onevent type="ontimer">
<go href="#card3"/>
</onevent>
<timer value=".01"/>
<p align="center" >
<img src="r.wbmp" alt=""/>
</p>
</card>

<card id="card3" title="Image">


<onevent type="ontimer">
<go href="#card4"/>
</onevent>
<timer value=".01"/>
<p align="center" >
<img src="dn.wbmp" alt=""/>
</p>
</card>

<card id="card4" title="Image">


<onevent type="ontimer">
<go href="#card1"/>
</onevent>
<timer value=".01"/>
<p align="center" >
<img src="l.wbmp" alt=""/>
</p>
</card>

</wml>
OUTPUT OF EXPERIMENT 11
EXPERIMENT - 12

AIM:

WAP in WML to make address book (make index containing the names which
should have links to see the details)

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">

<wml>

<card id="card1" title="ADDRESS BOOK">


<p align="center">
<big><b>INDEX</b></big><br/>
<a href="#card2">ANKITA GUPTA</a><br/>
<a href="#card3">MEGHA DALMIA</a><br/>
<a href="#card4">HIMANSHU MITTAL</a><br/>
<a href="#card5">MITUL GUPTA</a><br/>
<a href="#card6">AKSHIT WADHWA</a><br/>
<a href="#card7">ANKIT</a><br/>
<a href="#card8">VIDITA</a><br/>
<a href="#card9">DEEPTI WADHWA</a>
</p>
</card>

<card id="card2" title="ANKITA GUPTA">


<p align="center">
<big><b>ANKITA GUPTA</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>A-456<br/>FER COLONY<br/>ADARSH
NAGAR<br/>DELHI<br/>
<b><u>CONTACT -</u></b><br/>8825369147<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>
<card id="card3" title="MEGHA DALMIA">
<p align="center">
<big><b>MEGHA DALMIA</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>123 BLOCK-K <br/> ROHINI SEC-8 <br/>DELHI<br/>
<b><u>CONTACT -</u></b><br/>9956842574<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

<card id="card4" title="HIMANSHU MITTAL">


<p align="center">
<big><b>HIMANSHU MITTAL</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>HOUSE -:555 GTFH APARTMENTS<br/>SECTOR-
88<br/>-IDA<br/>
<b><u>CONTACT -</u></b><br/>5564987321<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

<card id="card5" title="MITUL GUPTA">


<p align="center">
<big><b>MITUL GUPTA</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>891 C-BLOCK<br/>WXYZ ENCLAVE<br/>DELHI<br/>
<b><u>CONTACT -</u></b><br/>9513574862<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

<card id="card6" title="AKSHIT WADHWA">


<p align="center">
<big><b>AKSHIT WADHWA</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>189 LOK VIHAR<br/>PITAM PURA<br/>DELHI<br/>
<b><u>CONTACT -</u></b><br/>9635786241<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

<card id="card7" title="ANKIT">


<p align="center">
<big><b>ANKIT</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>WZ-9087 RANI BAGH<br/>DELHI<br/>
<b><u>CONTACT -</u></b><br/>357968421<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

<card id="card8" title="VIDITA">


<p align="center">
<big><b>VIDITA</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>HOUSE -:90 <br/>RETY
APARTMENTS<br/>SECTOR-9 DWARKA<br/>
<b><u>CONTACT -</u></b><br/>9963578246<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

<card id="card9" title="DEEPTI ARORA">


<p align="center">
<big><b>DEEPTI ARORA</b></big><br/><br/>
<b><u>ADDRRESS</u></b><br/>W-97 SHASTRI NAGAR<br/>DELHI<br/>
<b><u>CONTACT -</u></b><br/>011-8523691<br/>
<b><u>EMAIL-ID</u></b><br/>[email protected]<br/>
<a href="#card1">BACK TO INDEX</a>
</p>
</card>

</wml>
OUTPUT OF EXPERIMENT 12
EXPERIMENT - 13

AIM:

WAP in WML to create a page displaying 4 types of food and on selecting a


particular one it shows the name of restaurant where you can get best food of that
type. (using setvar, select, option tags and onpick, onenterforward event).

CODE:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>

<card id="card1" title="welcome">

<p>

Select the type of food you like:<br/>


<select name="food">

<option>
<onevent type="onpick">
<go href="#card2"/>
</onevent>
INDIAN
</option>

<option>
<onevent type="onpick">
<go href="#card3"/>
</onevent>
CHINESE
</option>

<option>
<onevent type="onpick">
<go href="#card4"/>
</onevent>
ITALIAN
</option>

<option>
<onevent type="onpick">
<go href="#card5"/>
</onevent>
THAI
</option>

</select>
</p>
</card>

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


<onevent type="onenterforward">
<go href="#card6">
<setvar name="restaurant" value="THE BUKHARA, ITC Maurya Sheraton Hotel "/>
<setvar name="add" value="INDIAN"/>
</go>
</onevent>
</card>

<card id="card3" title="CHINESE">


<onevent type="onenterforward">
<go href="#card6">
<setvar name="restaurant" value="Ichiban Restaurant ,9, pandara road market "/>
<setvar name="food" value=" CHINESE "/>
</go>
</onevent>
</card>

<card id="card4" title="ITALIAN">


<onevent type="onenterforward">
<go href="#card6">
<setvar name="restaurant" value="The Big Chill , HS-5 Kailash Colony Market "/>
<setvar name="food" value="ITALIAN "/>
</go>
</onevent>
</card>

<card id="card5" title="THAI">


<onevent type="onenterforward">
<go href="#card6">
<setvar name="restaurant" value=" Cafe Fontana, Taj hotel "/>
<setvar name="food" value="THAI "/>
</go>
</onevent>
</card>

<card id="card6" title="RESULT">


<p align="center">
YOU CAN HAVE BEST $food
FOOD IN DELHI AT $restaurant
</p>
</card>

</wml>
OUTPUT OF EXPERIMENT 13

You might also like