WML: Basic Application
Below a basic application is given which Assn.wml build only to demonstrate the basic flow of the wml files,
this file is for only to use selectbox and to check the functionalities of .wml and .wmls files.
Assn.wml
Below a basic application is given which Assn.wml build only to demonstrate the basic flow of the wml files,
this file is for only to use selectbox and to check the functionalities of .wml and .wmls files.
Assn.wml
calc.wml is the basic file coded below to work as basic calculator with another function file which is also provided here,
<?xml version=”1.0″?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN” “http://www.wapforum.org/DTD/wml_1.1.xml”>
<wml>
<card id=”card1″ title=”Calculator” newcontext=”true”>
<p>
Value1: <br/><input format=”N*M” name=”amount1″ title=”First Amount:”/>
Operator : <br/><select name=”operator” value=”ADD” title=”Operation:”>
<option value=”ADD”>Addition</option>
<option value=”SUB”>Subtraction</option>
<option value=”MULT”>Multiplication</option>
<option value=”DIV”>Division</option>
</select>
Value2: <br/><input format=”N*M” name=”amount2″ title=”Second Amount:”/>
Result : = <b>$(answer)</b>
<do type=”accept” label=”Result”>
<go href=”calc.wmls#operation(‘answer’,$(amount1),’$(operator)’,$(amount2))”/>
</do>
</p>
</card>
</wml>
Here, calc.wmls is the function file, means script which contains all the functions which is needed in calc.wml
extern function operation(result,val1,operate,val2) {
var ans=0;
if (operate==’ADD’)
{
ans = val1 + val2;
}
else if (operate==’SUB’)
{
ans=val1 – val2;
}
else if (operate==’MULT’)
{
ans=val1 * val2;
}
else
{
ans=val1 / val2;
}
WMLBrowser.setVar(result,ans);
WMLBrowser.refresh();
}
Configuring Microsoft Internet Information Services (IIS)
Microsoft Internet Information Server (IIS) is a free Web server that can be acquired with the following operating systems to serve WML pages:
• Microsoft Windows NT 4 – IIS version 4.0 comes in the NT 4.0 option pack.
• Microsoft Windows 2000/server – IIS 5.0 is built in to Windows 2000.
• Microsoft Windows XP – IIS 5.1 is built in to Windows XP.
• Microsoft Windows 2003 – IIS 6.0 is built in to Windows 2003.
IIS has a graphical user interface, the Internet Service Manager, for configuring all aspects of the Web server.
The following step-by-step guide can be used to set up MIME types:
1. Start the Microsoft Management Console (Start => Run =>MMC) and load the IIS snap-in from the c:\winnt\system32\inetsrv\iis directory.
The Internet Services Manager can also be opened from Start => Control Panel => Administrative Tools => ‘Internet Information Services Manager’ or ‘Internet Information Services’ depending on the version and Windows Operating System.
2. Right click on the node that matches the name of your web server (by default: ‘Default Web Site’) and choose the Properties option.
