title: jQuery to get value of textbox
body: <p>I need to write some jQuery/javascript to do some validation before submitting a form, because I have to check per some very specific results.  Per my tests I believe I am accessing the correct row of data as $(this) in my table with my validation tests, however I cannot get the value typed into the text box of the second td of the row.  Something is incorrect with: </p>
  
  <p><code>alert($(this).closest('td').find($("input[name=test]")).val())</code></p>
  
  <p>which is preventing the jQuery from getting the value typed into the test textbox of the html below.</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;
      &lt;select id="selectId3" name="selectId3" data-val-required="The selectId3 field is required." data-val-number="The field selectId3 must be a number." data-val="true"&gt;
          &lt;option value=""&gt;-- Select Area --&lt;/option&gt;
          &lt;option value="2"&gt;2&lt;/option&gt;
          &lt;option value="6"&gt;6&lt;/option&gt;
          &lt;option value="7"&gt;7&lt;/option&gt;
          &lt;option value="10"&gt;10&lt;/option&gt;
          &lt;option value="13"&gt;13&lt;/option&gt;
          &lt;option value="16"&gt;16&lt;/option&gt;
          &lt;option value="17"&gt;17&lt;/option&gt;
      &lt;/select&gt;
  &lt;/td&gt;
  &lt;td&gt;
      &lt;span style="label2"&gt;
          &lt;input id="test" type="text" value="" name="test"&gt;
      &lt;/span&gt;
  &lt;/td&gt;
  &lt;td&gt;   &lt;/td&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>$('#myForm').submit(function () {
      $("select").each(function () {
          if (($(this).val() != '') &amp;&amp; ($(this).val() != '-- Select Area --')) {
              alert($(this).closest('td').find($("input[name=test]")).val());
          }
      });
      return false;
  });
  </code></pre>
  
  <p>If anyone can describe the correct jQuery to get the textbox value I would greatly appreciate it.</p>
  
  <p>Thanks in advance.</p>