title: jQuery change textfield in tablerow by dropdown
body: <p>I'm not very firm with JS and this whole jQuery thing.</p>
  
  <p>This is my actuall HTML Output created in a foreach-loop:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#ProjectOfferPosition0IsystemTypeVariantId').on('change', function () {
      var prices = [];
      prices[1] = 500.00;
      prices[2] = 600.00;
      prices[6] = 1000.00
      var key = $('#ProjectOfferPosition0IsystemTypeVariantId option:selected').val();
      var oldPrice = 800.00;
      $('#ProjectOfferPosition0Price').val(prices[parseInt(key,10)] + oldPrice);
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;input type="hidden" name="data[ProjectOfferPosition][0][isystem_id]" value="1" id="ProjectOfferPosition0IsystemId"/&gt;&lt;input type="hidden" name="data[ProjectOfferPosition][0][count]" value="1" id="ProjectOfferPosition0Count"/&gt;I&lt;/td&gt;
    &lt;td&gt;&lt;select name="data[ProjectOfferPosition][0][isystem_type_variant_id]" id="ProjectOfferPosition0IsystemTypeVariantId" class="select" required="required"&gt;
      &lt;option value=""&gt;ohne Variante wählen&lt;/option&gt;
      &lt;option value="1"&gt;INPUT Basis System Wohnung 60&lt;/option&gt;
      &lt;option value="2"&gt;INPUT System Wohnung 100&lt;/option&gt;
      &lt;option value="6"&gt;INPUT System Haus 300&lt;/option&gt;
    &lt;/select&gt;&lt;/td&gt;
    &lt;td&gt;&lt;input name="data[ProjectOfferPosition][0][price]" step="0.01" type="number" value="800.00" id="ProjectOfferPosition0Price" class="input"/&gt;&lt;input type="hidden" name="data[ProjectOfferPosition][0][position]" value="1" id="ProjectOfferPosition0Position"/&gt;&lt;/td&gt;
  &lt;/tr&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>when i change the value of the dropdown i want the textfield in the same row updated (add a option-price to the existing product).
  thing is tho, i don't know how to 'read' which row i'm in (the [0]-Part)</p>
  
  <p><strong>EDIT</strong>
  got it running. still but still hardcoded, not dynamical responding to multiple rows</p>
  
  <p>thank you for your help in advance</p>