Won Contests Let Us Talk Mail Me Light of Knowledge


W ML - Wireless Markup Language
  
 Building Mobile Applications using WAP & Wireless Programming


     WML tables are similar in look and operation to HTML tables. The main tag pair is

<table></table>

     The opening table tag must also specify how many columns there are in the table, by setting a 'columns' attribute. It may also take an alignment attribute, 'align'. This works differently from the paragraph alignment attribute. The alignment of each column in the table is specified by one of the three letters 'R', 'L' or 'C' (for right, left and centre). The following tags describe a table that has two columns, the first of which is aligned to the centre, the second of which is aligned to the right.

<table columns="2" align="CR"></table>

     The <tr></tr> tags specify the table's rows, whereas the <td></td> tags hold the data for each cell. If more cells are given than the table has columns for, the excess data seems to be placed into the rightmost cell.

     Because of the idiosyncratic behaviour, as well as the small display area, tables tend not to look very good in microbrowsers. In the following example, the mode value of the paragraph tag is set to 'nowrap', so the table takes its full length.

 
 Content formatting using tables
The code below shows 2 How to use HTML format tables ......
<?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="Welcome">
 		<p mode="nowrap">
 		<table title="demo" align="LL" columns="2">
 			<tr>
 				<td> Column 1, row 1</td>
 				<td> Column 2, row 1</td>
 			</tr>
 			<tr>
 				<td> Column 1, row 2</td>
 				<td> Column 2, row 2</td>
 			</tr>
 		</table>
 </p>
 </card>
 </wml>
 Running the code
1) save the above file as table.wml in E:\wml\ Directory
2) Open UPSDK Browser, which will be a shortcut created during installation
3) Type in the URL file://e:/wml/table.wml next to GO Button Text Box, Hit Enter ..........
4) Always remember whenever u make changes to the wml script, u must click on Edit Clear Cache to View New Screen and Re-Enter URL
 What Next ? Formatting Text, Image Placement
 Reach me!
   My Web URL : http://www.geocities.com/james_smith73
   If you like this article and/or code mailme or Join our small Group of Java Programmers ,
Till we meet next time BYE     

  Java, J2EE, J2SE and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the United States and other countries.