title: jquery can't get the value from an input element (2)
body: <p>I am using jquery trying to retrieve the value of a text input but it is not working. can anyone see what I am doing wrong? <a href="http://jsfiddle.net/silvajeff/4Sb8K/3/" rel="nofollow">http://jsfiddle.net/silvajeff/4Sb8K/3/</a></p>
  
  <pre><code>&lt;table id="oustandingItems"&gt;
    &lt;tr&gt;&lt;th&gt;Category&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;input name="mytest" /&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;input name="mytest" value="123"/&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;input name="mytest" /&gt;&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;input name="mytest" /&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  
  
  &lt;button id="findRow"&gt;Find Row&lt;/button&gt;
  &lt;input type="text" id="myRow" /&gt;
  
  $("#findRow").click(function() {   
    var tableRow = $('#oustandingItems tr:has(td input[value!=""])').prevAll().length;  
   var myValue = $('#oustandingItems input:has(td input[value!=""])').val();
    $("#myRow").val(myValue);
  });
  </code></pre>