title: How to get table row index when the column textbox value change using jQuery
body: <p>I want to get row index and text box values when the table price text box value changes. At the moment I'm getting some undefined value.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;table class="table table-striped"&gt;
      &lt;thead&gt;
          &lt;tr&gt;                   
              &lt;th&gt;Product&lt;/th&gt;                              
              &lt;th&gt;Price&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;input type="text" class="form-control product"&gt;
              &lt;/td&gt; 
              &lt;td&gt;
                  &lt;input type="text" oninput="javascript:GetValue(this);" class="form-control price"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt; 
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>function GetValue(oTextBox) {
      var price = oTextBox.value;
      var product = oTextBox.parent().prev().innerHTML.value;
      var rowindex = oTextBox.closest('tr').index();
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>TypeError: oTextBox.parent is not a function
    var product = oTextBox.parent().prev().innerHTML.value;</p>
  </blockquote>