android - Dojo mobile : Selectbox not functioning properly -


just trying make demo android app using dojo mobile , phone gap. moment add selectbox, whole ui goes haywire. buttons stop functioning , don't appear buttons anymore. same happening in case of text box.

my setup phonegap 1.2.0 dojo mobile , dojo 1.9.3 please refer code snippet below.

<script type="text/javascript">    dojo.require("dojox.mobile.parser");    dojo.require("dojox.mobile"); </script> </head>  <body> <div dojotype="dojox.mobile.view" id="testapp" selected="true">   <h1 dojotype="dojox.mobile.heading">test</h1>   <div class="text">select semester</div>   <select multiple="true" name="multiselect" data-dojo-type="dojox.form.checkedmultiselect">     <option value="s1">opt 1</option>     <option value="s2">opt 2</option>   </select>    <div data-dojo-type="dojox.mobile.heading">    <span data-dojo-type="dojox.mobile.toolbarbutton" data-dojo-props='arrow:"right"'>homepage</span>    <span data-dojo-type="dojox.mobile.toolbarbutton" data-dojo-props='arrow:"right"'>detailsentry</span>    </div>  </div> </body> 

p.s. if remove select box thingy, buttons work fine. p.p.s same happens if use textbox in place of select box.

any appreciated.

thanks , regards

you're missing dojo.require() checked multiselect:

dojo.require("dojox.mobile.parser"); dojo.require("dojox.mobile"); dojo.require("dojox.form.checkedmultiselect"); 

if don't add list, dojo parser (= module converts markup valid widgets), stumble upon , stop processing rest. that's why stops functioning.

here jsfiddle: http://jsfiddle.net/yp6px/

however, you're mixing mobile , desktop widgets (dojox/form/checkedmultiselect desktop widget), may not give best user experience these widgets not designed mobile use. better way use list (for example dojox/mobile/roundrectlist) listitems (dojox/mobile/listitem) checkboxes (dojox/mobile/checkbox) in them, example:

<div dojotype="dojox.mobile.roundrectlist">     <div dojotype="dojox.mobile.listitem">         <input dojotype="dojox.mobile.checkbox" type="checkbox" value="s1"/> opt 1     </div>     <div dojotype="dojox.mobile.listitem">         <input dojotype="dojox.mobile.checkbox" type="checkbox" value="s2"/> opt 2     </div> </div> 

an example fiddle: http://jsfiddle.net/yp6px/1/


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -