title: Using Dojo passing value from textbox to alert on click
body: <p>Using the <a href="http://en.wikipedia.org/wiki/Dojo_Toolkit" rel="nofollow noreferrer">Dojo Toolkit</a> I am trying to pass the value from textbox to an alert on click. I tried attr to obtain value inside the function helloPressed(), but I am not even able to reset the textbox value when I tried the other way. </p>
  
  <p>I am new to the programming world.</p>
  
  <pre><code>function helloPressed() 
  {
      var gt =  dojo.attr("htext1","value");
      alert(gt).show();
  }
  
  &lt;input dojoType="dijit.form.textbox"  name="name1" widgetId="htext1" 
   dojoType="dijit.form.TextBox" intermediateChanges="true" value="hello"  
   trim="true" propercase="true" /&gt;&lt;/input&gt;
  &lt;button dojoType="Button" widgetId="helloButton"
   onClick="helloPressed()"&gt;Click !&lt;/button&gt;
  </code></pre>
  
  <p>I tried other combinations as well, but no success :(</p>