title: Changing value of text field with jQuery
body: <p>I have a form input text field, and I want to change the text inside of the text field when the user clicks a button. I can get the specific textfield with jQuery, but cannot change the text with .val(). Is there another way this can be done, or am I doing something wrong. </p>
  
  <p>Here is the text field:</p>
  
  <pre><code>&lt;input type="text" name="textBox" id="Stage 1text" size="20" value="Enter Current Comp." align="center"&gt;
  </code></pre>
  
  <p>Then I use this to identify and change the text field. where in this case stage = "Stage 1" and dance is the string I want to place in the text field.</p>
  
  <pre><code>str = "#" + stage + 'text';
  alert(str + '::' + dance); // confirm that strings are correct
  jQuery(str).val(dance);
  </code></pre>