<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>defza :: def - ZA &#187; dev</title>
	<atom:link href="http://www.defza.com/wordpress/category/dev/feed" rel="self" type="application/rss+xml" />
	<link>http://www.defza.com/wordpress</link>
	<description>life organization</description>
	<lastBuildDate>Tue, 08 Feb 2011 15:39:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Motorola wap dropdown list (&lt;select&gt;) + Motorola ADK</title>
		<link>http://www.defza.com/wordpress/mobile-cellphone/motorola-wap-dropdown-list-select-motorola-adk</link>
		<comments>http://www.defza.com/wordpress/mobile-cellphone/motorola-wap-dropdown-list-select-motorola-adk#comments</comments>
		<pubDate>Tue, 23 Jan 2007 09:52:54 +0000</pubDate>
		<dc:creator>def za</dc:creator>
				<category><![CDATA[dev]]></category>
		<category><![CDATA[mobile cellphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.defza.com/wordpress/mobile-cellphone/motorola-wap-dropdown-list-select-motorola-adk</guid>
		<description><![CDATA[OK, Motorola&#8217;s wap / xhtml browser on their phones has a few issues. (Scrolling issue I pointed out) The Problem I noticed that dropdown boxes (&#60;select&#62; html elements with &#60;option&#62;&#8217;s) on Motorola phones were being shown as a list, instead of as the usual dropdown list that we are used to. Normal dropdown box html [...]]]></description>
			<content:encoded><![CDATA[<p>OK, Motorola&#8217;s wap / xhtml browser on their phones has a few issues. (<a href="http://www.defza.com/wordpress/mobile-cellphone/motorola-browser-scrolling-problem-fix">Scrolling issue I pointed out</a>)</p>
<h2><a name="section-6"></a>The Problem</h2>
<p>I noticed that dropdown boxes (&lt;select&gt; html elements with &lt;option&gt;&#8217;s) on Motorola phones were being shown as a list, instead of as the usual dropdown list that we are used to.</p>
<p><small><br />
<table cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" width="70%">Normal dropdown box html</th>
<th align="left" width="30%">How a dropdown box should look like</th>
</tr>
<tr>
<td valign="top">&lt;select&gt;<br />
      &lt;option value=&quot;CellC&quot;&gt;CellC&lt;/option&gt;<br />
      &lt;option value=&quot;MTN&quot;&gt;MTN&lt;/option&gt;<br />
      &lt;option value=&quot;Vodacom4me&quot;&gt;Vodacom&lt;/option&gt;<br />
      &lt;option value=&quot;Virgin&quot;&gt;Virgin Mobile&lt;/option&gt;<br />
      &lt;/select&gt;</td>
<td valign="top">
<pre>
<select>
<option value ="CellC">CellC</option>
<option value ="MTN">MTN</option>
<option value ="Vodacom4me">Vodacom</option>
<option value ="Virgin">Virgin Mobile</option>
</select>
</pre>
</td>
</tr>
</table>
<p></small></p>
<p>Motorola shows it &#8220;wrongly&#8221; like this instead:</p>
<pre>
<select size="4">
<option value ="CellC">CellC</option>
<option value ="MTN">MTN</option>
<option value ="Vodacom4me">Vodacom</option>
<option value ="Virgin">Virgin Mobile</option>
</select>
</pre>
<p>Which does waste a lot of space on the limited screen size of a mobile cellphone.</p>
<h2><a name="section-7"></a>The Solution</h2>
<p><span id="more-108"></span></p>
<h3><a name="section-8"></a>Fix Method 1: Leave out the closing /option tags</h3>
<p>This is the easiest way to fix, although it doesn&#8217;t make the markup XHTML, it is still valid HTML.<br />
<strong>You have to leave out the closing OPTION tags.</strong></p>
<p>Like so:<br />
<code><br />
&lt;select&gt;<br />
      &lt;option value=&quot;CellC&quot;&gt;CellC<br />
      &lt;option value=&quot;MTN&quot;&gt;MTN<br />
      &lt;option value=&quot;Vodacom4me&quot;&gt;Vodacom<br />
      &lt;option value=&quot;Virgin&quot;&gt;Virgin Mobile<br />
      &lt;/select&gt;</code></p>
<p>That&#8217;s it, the Motorola will then display the dropdown as a normal PC browser would.</p>
<h3><a name="section-9"></a>Fix Method 2: Add a Optgroup</h3>
<p>In HTML there is a cool &lt;optgroup&gt; tag.  Which allows you to group items in a dropdown list.<br />
Example:</p>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" width="60%">HTML Source</th>
<th align="left" width="40%">Normal Output</th>
</tr>
<tr>
<td valign="top">&lt;select&gt;<br />
      &lt;optgroup label=&quot;Motorola&quot;&gt;<br />
      &lt;option value=&quot;v3&quot;&gt;v3&lt;/option&gt;<br />
      &lt;option value=&quot;v360&quot;&gt;v360&lt;/option&gt;<br />
      &lt;/optgroup&gt;<br />
      &lt;optgroup label=&quot;Nokia&quot;&gt;<br />
      &lt;option value=&quot;6230i&quot;&gt;6230i&lt;/option&gt;<br />
      &lt;option value =&quot;7250i&quot;&gt;7250i&lt;/option&gt;<br />
      &lt;/optgroup&gt;<br />
      &lt;/select&gt;</td>
<td valign="top">
<pre>
<select>
        <optgroup label="Motorola">
<option value="v3">v3</option>
<option value="v360">v360</option>

        </optgroup>
        <optgroup label="Nokia">
<option value="6230i">6230i</option>
<option value="7250i">7250i</option>

        </optgroup></pre>
</select>
</td>
</tr>
</table>
<p><strong>So, to get the motorola to display a dropdown list as we would like it to, we just have to add one &lt;optgroup&gt; element to the &lt;select&gt;ion box.</strong></p>
<p>Like this:</p>
<p>&lt;select&gt;<br />
<strong>&lt;optgroup&gt;</strong><br />
      &lt;option value=&quot;CellC&quot;&gt;CellC&lt;/option&gt;<br />
      &lt;option value=&quot;MTN&quot;&gt;MTN&lt;/option&gt;<br />
      &lt;option value=&quot;Vodacom4me&quot;&gt;Vodacom&lt;/option&gt;<br />
      &lt;option value=&quot;Virgin&quot;&gt;Virgin Mobile&lt;/option&gt;<br />
<strong>&lt;/optgroup&gt;</strong><br />
      &lt;/select&gt;</p>
<p>In PHP before generating the &#8220;option&#8221; tags I check if it&#8217;s a Motorola phone and do this:<br />
<code>if (strstr($_SERVER['HTTP_USER_AGENT'], "MOT-")) {<br />
                echo '&lt;optgroup&gt;';<br />
        }<br />
</code><small>And remember to close it afterwards.</small></p>
<h2><a name="section-10"></a>The Tools</h2>
<p>Motorola actually has a browser / internet / xhtml / html-mobile / wml /wap simulator-emulator program so that you can test how your webpage / wappage will look on a Motorola.<br />
It&#8217;s called the Motorola ADK (Application Developer Kit).</p>
<p><strong>ADK Features</strong></p>
<blockquote><p>
    * Supports WML, cHTML and xHTML-basic<br />
    * Syntax Directed Editor and Script Debugger<br />
    * WML Script Compiler: 1.2.1 Compliance<br />
    * WML Script Debugging<br />
    * Incorporates actual browser components &#8211; to achieve Realistic Simulation capabilities across Motorola and other devices
</p></blockquote>
<p>Download the <a href="http://developer.motorola.com/docstools/sdks/e398ADK/?login=1">Motorola E398 ADK</a>. <small>Requires Login / registration first. <a href="http://www.bugmenot.com/view/developer.motorola.com">Get Skip Registration here</a> or <a href="http://spamy.defza.com/upload/index.php?dir=files/motorola/adk/&#038;file=e398_ADK.zip">Download Moto ADK directly</a>.</small><br />
The actual cellphone model / version of the ADK doesn&#8217;t matter as their browser is pretty much the same across all the phones. (V3, V3x razr, renders the same way as MOT-E398) </p>
<p><strong>Happy testing!</strong></p>
<p>I came across this problem because the contact quick list I have on my <a href="http://wap.defza.com">free sms sites</a> (<a href="http://wap.defza.com/cellc">CellC</a>, <a href="http://wap.defza.com/mtn">MTN</a>, <a href="http://wap.defza.com/voda">Vodacom</a>) weren&#8217;t showing nicely on Motorolas. Now that&#8217;s all fixed <img src='http://www.defza.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>UPDATE</strong>: Added a new workaround. (exclude the closing &lt;/option&gt; tags)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.defza.com/wordpress/mobile-cellphone/motorola-wap-dropdown-list-select-motorola-adk/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>writing cellphone mobile programs (j2me)</title>
		<link>http://www.defza.com/wordpress/mobile-cellphone/writing-cellphone-mobile-programs-j2me</link>
		<comments>http://www.defza.com/wordpress/mobile-cellphone/writing-cellphone-mobile-programs-j2me#comments</comments>
		<pubDate>Sat, 04 Mar 2006 14:23:29 +0000</pubDate>
		<dc:creator>def za</dc:creator>
				<category><![CDATA[dev]]></category>
		<category><![CDATA[mobile cellphone]]></category>

		<guid isPermaLink="false">http://www.defza.com/wordpress/mobile-cellphone/writing-cellphone-mobile-programs-j2me</guid>
		<description><![CDATA[And so, I added some content to the j2me tutorial page. Someone needed help with this topic, which pushed me to write up something on writing mobile phone programs. I mean, if you help one person why not make the information available for everyone? That will save the next person from going through all the [...]]]></description>
			<content:encoded><![CDATA[<p>And so, I added some content to the <a href="http://www.defza.com/wordpress/development/j2me-tutorial/">j2me tutorial</a> page.</p>
<p>Someone needed help with this topic, which pushed me to write up something on writing mobile phone programs.<br />
I mean, if you help one person why not make the information available for everyone?  That will save the next person from going through all the same unnecessary gripes.</p>
<p>It&#8217;s always like that.  No-one will create something that has a zero demand.</p>
<p>Anyway, back to the reason for this page &#8211; cellphone development.</p>
<p>Most cellphones use a mini java <abbr title="Virtual Machine">VM</abbr> mostly referred to as the <abbr title="Java 2 Mobile Edition">J2ME</abbr>.  So, you need to write the game or application in the Java language basically.</p>
<p>The tools available are neat &#8211; read more on the page :: <a href="http://www.defza.com/wordpress/development/j2me-tutorial/">http://www.defza.com/wordpress/development/j2me-tutorial/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.defza.com/wordpress/mobile-cellphone/writing-cellphone-mobile-programs-j2me/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.417 seconds -->

