140 likes | 298 Views
XML/WML ISQA 407. Sergio Davalos Spring 2002. Content. Images Tables Variables. Images. Bitmap – pixelization – pixel by pixel (resolution?) 1000100100101 0010010100101 0001001010010 WBMP – need tools (Photshop/Paintshop) Not compressed Color?. So how do I do it?.
E N D
XML/WML ISQA 407 Sergio Davalos Spring 2002
Content • Images • Tables • Variables
Images • Bitmap – pixelization – pixel by pixel (resolution?) • 1000100100101 • 0010010100101 • 0001001010010 • WBMP – need tools (Photshop/Paintshop) • Not compressed • Color?
So how do I do it? • Image element - <img src=“url” alt=“text” /> • Current deck used as reference point • <img src=“mylittlebitmap.wbmp” alt=“An image is usually here” /> • Try it Out • Predefined local images • <img localsrc=“sba” src=“sba.wbmp” alt=“SBA” /> • Aligning images • Top/middle/bottom • <img align=“top” • Image size • <img src=“bmap.wbmp” alt=“Image” width=“31” height=“20” /> • <img src=“bmap.wbmp” alt=“Image” vspace=“5” hspace=“2” /> • <img src=“bmap.wbmp” alt=“Image” vspace=“5%” hspace=“5%” />
Tables • Table element – • <table columns=“number”> • <table columns=“3”> • <tr> • Row 1 content • <td> row 1 column 1 content </td> • <td> row 1 column 2 content </td> • </tr> • </table> • Labeling – add title attribute • <table columns=“3” title=“MyTable”> • Alignment = add align attribute • <table columns=“3” align=“left”>
Variables • Defining variables • <setvar> element • <setvar name=“varname” value=“mystring”/> • <setvar name=“CustCount” value=“100”/> • Syntax • Start with letter or underscore characters • Contains letters,underscore characters, numbers • Positioning – within <go>, <prev>, <refresh> • <go href=“#card2”> • <setvar name=“var1’ value=“100”> • </go>
Using • Referencing - $var1 • <p> • Variable var1 is set to $var1 • </p> • Variable context • <card id=“newcard” newcontext=“true”. • </card> • Deletes all previous variables – good for space limited phones
Acquiring User input • Users enter input • List of options • Grouping input fields
Entering text • <wml> • <card> • <p> • Some text <input attributes/> Some more text </p> </card> </wml> <input name=“var1”> - sets var1 to the value entered
Example <wml><card><p>Enter your username<input username=“var1”/>Your username is: -- shows up when you press the OK key -- </p></card></wml>F10 – displays all values of variables Other aspects: <input name=“var1” value=“anonymous”/>
Other aspects Type attribute: text or password Passwords <input name=“pwd” type=“password”/> Note: F10 will display the password value Attribute: title <input name=“Bond” value=“Ted Connery” title=“Best Bond”/> Attribute: size(in characters) & maxlength <input name=“Bond” value=“Ted Connery” size=“12” maxlength=“11”/>
Formatting text entry <input name=“username” format=“AA\-NNNN”/>
Selecting from a list Example <p> Select location:<br> <select name=“loc”> <option value=“NW”>Northwest</option> <option value=“SW”>Southwest</option> <option value=“E”>East</option> <option value=“SE”>Southeast</option> <option value=“W”>West</option> </select> </p>
Multiple entries and grouping Multiple entries example: <select name=“fish” iname=“ifish” multiple=“true”> Grouping Example: Select location <card> <p> <select name=“loc” iname=“iloc” multiple=“true”> <optgroup title=“West” <option value=“NW” >NorthWest</option> <option value=“SW” >SouthWest</option> </optgroup> <optgroup title=“East” <option value=“SE” >SouthEast</option> <option value=“NE” >Northeast</option> </optgroup> </select> Thanks </p> </card>