title: Calculate the values from select option with Javascript and/or jQuery
body: <p><em>Firstly: I know I should provide my solution and explain what's not working. But unfortunately I'm still learning HTML and PHP, so I don't have experience with Javascript. Thought, I hope somebody can help me.</em></p>
  
  <p>In my website there's a form. In this form there's this code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;select name="size"&gt;
       &lt;option value="" disabled selected&gt;Size ↓&lt;/option&gt;
       &lt;option value="AAA"&gt;AAA (10 €)&lt;/option&gt;
       &lt;option value="BBB"&gt;BBB (20 €)&lt;/option&gt;
       &lt;option value="CCC"&gt;CCC (30 €)&lt;/option&gt;
       &lt;option value="DDD"&gt;DDD (40 €)&lt;/option&gt;
      &lt;/select&gt;
      
      &lt;select name="discount"&gt;
       &lt;option value="" disabled selected&gt;Option ↓&lt;/option&gt;
       &lt;option value="Option1"&gt;Option 1 (0 %)&lt;/option&gt;
       &lt;option value="Option2"&gt;Option 2 (-5 %)&lt;/option&gt;
       &lt;option value="Option3"&gt;Option 3 (-8 %)&lt;/option&gt;
      &lt;/select&gt;
      
      &lt;select name="method_of_payment"&gt;
       &lt;option value="" disabled selected&gt;Method of payment ↓&lt;/option&gt;
       &lt;option value="transfer"&gt;Transfer (0 % cashback)&lt;/option&gt;
       &lt;option value="debit"&gt;Debit (-3 % cashback)&lt;/option&gt;
      &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is like a shop. I want to pre-calculate the final price for the user with Javascript. (I don't want to reload the website. Otherwise I would do it with PHP.) I want to have an output like: <code>The final price is 18,43 €. You saved 1,57 €</code>.</p>
  
  <p>The cash back from "method_of_payment" must go on the final price of size and discount. That means for <code>size = BBB</code> and <code>discount = Option2</code> and <code>method_of_payment = debit</code>: <code>20-(20/100*5)=19 | 19-(19/100*3)=18,43 €</code></p>
  
  <p>Another problem is, that I have the values like <code>AAA</code> and <code>Option1</code> and <code>transfer</code> in my database when the form gets submitted. Bus as far as I know Javascript needs the value for calculation in the <code>value=""</code> field. Or is there a workaround?</p>