title: my numeric key pad does not display the key press in the password field
body: <p>I am doing exercise from the book &quot;<strong>building-cross-platform-mobile-pawan-lingras</strong>&quot;
  but the numeric key pad does not display the value in the text box every time I click on a keypad.</p>
  <p>I have linked the html file with JS file and bootstrap already.</p>
  <p>Below is the  code sample for html:</p>
  <pre><code> Password:&lt;input type=&quot;password&quot; id=&quot;passcode&quot;&gt;&lt;/input&gt;
   -----
   ----
   &lt;div data-role=&quot;controlgroup&quot; data-type=&quot;horizontal&quot;&gt;
          &lt;a data-role=&quot;button&quot;   onclick=&quot;addValueToPassword(4)&quot;&gt;4&lt;/a&gt;
          &lt;a data-role=&quot;button&quot;   onclick=&quot;addValueToPassword(5)&quot;&gt;5&lt;/a&gt;
          &lt;a data-role=&quot;button&quot;   onclick=&quot;addValueToPassword(6)&quot;&gt;6&lt;/a&gt;
      &lt;/div&gt;
  
  
    
  </code></pre>
  <p>javaScript sample:</p>
  <pre><code>function addValueToPassword(button)
  {
  var currVal=$(&quot;passcode&quot;).val();
  if(button=='bksp')
  {
      $(&quot;#passcode&quot;).val(currVal.substring(0, currVal.length-1));
  }
  else{
      $(&quot;#passcode&quot;).val(currVal.concat(button));
  }
  }
  </code></pre>