title: jQuery Join two form select elements into one value then change that value using switch
body: <p>I'm having a bit of an issue solving a jQuery form problem.</p>
  
  <p>Basically I have to select fields that I need to combine and then change the value of the combined options into a new value.</p>
  
  <p>So for example if a user chooses an option in select field A then another option is select field B, the two values are combined and then changed into an new value. Where that new value is posted to a hidden input field.</p>
  
  <p>Here's my HTML:</p>
  
  <pre><code>&lt;label&gt;Option A&lt;/label&gt;
  &lt;select id="option_a"&gt;
      &lt;option value=""&gt;&lt;/option&gt;
      &lt;option value="Aa"&gt;Aa&lt;/option&gt;
      &lt;option value="Ab"&gt;Ab&lt;/option&gt;
      &lt;option value="Ac"&gt;Ac&lt;/option&gt;
  &lt;/select&gt;
  &lt;br /&gt;
  &lt;label&gt;Option B&lt;/label&gt;
  &lt;select id="option_b"&gt;
      &lt;option value=""&gt;&lt;/option&gt;
      &lt;option value="Ba"&gt;Ba&lt;/option&gt;
      &lt;option value="Bb"&gt;Bb&lt;/option&gt;
      &lt;option value="Bc"&gt;Bc&lt;/option&gt;
  &lt;/select&gt;
  &lt;br /&gt;
  Combined Option: &lt;span id="new_option"&gt;&lt;/span&gt;
  &lt;br /&gt;
  New Price: &lt;span id="new_price"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>And my jQuery:</p>
  
  <pre><code>var new_option = $('#option_a').val() + $('#option_b').val();
  $("#new_option").text(new_option);
  var new_price = '';
  $(new_option).change(function() {
      switch ($(this).val()) {
      case "AaBa":
          new_price = "1";
          break;
      case "AaBb":
          new_price = "2";
          break;
      case "AaBc":
          new_price = "3";
          break;
      case "AbBa":
          new_price = "4";
          break;
      case "AbBb":
          new_price = "5";
          break;
      case "AbBc":
          new_price = "6";
          break;
      case "AcBa":
          new_price = "7";
          break;
      case "AcBb":
          new_price = "8";
          break;
      case "AcBc":
          new_price = "9";
          break;
      default:
          new_price = "0";
      }
      $("#new_price").text("$" + new_price);
      });
  });
  </code></pre>
  
  <p>I'm able to get what I need working with one form select field, but it's the combination of two that is putting a wrench in my gears.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Cheers</p>