Sunday, October 13, 2013

Mess with input fields in dojox.

A control:

<input type="text" style="z-index: 1;" data-dojo-attach-point="foo"
   data-dojo-type="dojox.mobile.TextBox" />

 
 

Set its value:

this.foo.set("value", "whatever");

 
 

Fish out its value:

var whatever = this.foo.get("value");

 
 

This all requires "dojox/mobile" in the opening define. This speaks to another way to go wherein one uses "dijit/form/TextBox" and goes fishing for controls to get/set from/to as seen above like so:

var box0 = registry.byId("value0Box");

No comments:

Post a Comment