Topic
2 replies Latest Post - ‏2012-11-07T16:23:01Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic unable to acess the value of dojox.mobile.TextBox with Id.

‏2012-11-05T08:58:40Z |
below is my Html file.

<script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true" src="dojo/dojo.js"></script>
<script type="text/javascript" src="dojo/core-web-layer.js"></script>
<script type="text/javascript" src="dojo/mobile-ui-layer.js"></script>
<script type="text/javascript" src="dojo/mobile-compat-layer.js"></script>
<script type="text/javascript">
require(
// Set of module identifiers
,
// Callback function, invoked on dependencies evaluation results
function(dojo) {

   dojo.ready(function() {
   });
});

<body>
<input data-dojo-type="dojox.mobile.TextBox" id ="firstName" name="firstName">

and in my JS file i tried to access the text Box using Id but im getting undefined.

**jsfile:**

var firstName = dojo.byId("firstName");

alert(firstName.value); // im getting " Undefined "

Please help me out.
R vinod.
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: unable to acess the value of dojox.mobile.TextBox with Id.

    ‏2012-11-05T10:36:43Z  in response to SystemAdmin
    I got the answer,

    • Thread Closed ---
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: unable to acess the value of dojox.mobile.TextBox with Id.

      ‏2012-11-07T16:23:01Z  in response to SystemAdmin
      Would you mind posting the answer? It may help users that search the forum for answers :-)

      http://imgs.xkcd.com/comics/wisdom_of_the_ancients.png