title: Concatenate selected values from dynamic dropdowns using jquery
body: <p>Question:</p>
  
  <p>How do I get the value from each dropdown and concatenate them to create a string of characters from those values?  These dropdowns are dynamically generated so I cannot select them by ID etc.</p>
  
  <p>Details:</p>
  
  <p>I have a list on n number of dropdowns depending on the product selected.
  Each dropdown is related to a character in a partnumber thus whichever is selected builds a string of characters to a variable to create a part number i.e.  "B119"
  Edit (include code):</p>
  
  <pre><code>    &lt;dt&gt;
      &lt;dd&gt;
          &lt;select class="ddlmain" name="product_attribute_180_3_17" id="product_attribute_180_3_17"&gt;
              &lt;option value="0"&gt;---&lt;/option&gt;
              &lt;option value="B"&gt;Blue&lt;/option&gt;
              &lt;option value="G"&gt;Green&lt;/option&gt;
              &lt;option value="R"&gt;Red&lt;/option&gt;
          &lt;/select&gt;
      &lt;/dd&gt;
  &lt;/dt&gt;
  &lt;dt&gt;
      &lt;dd&gt;
          &lt;select class="ddlmain" name="product_attribute_180_1_18" id="product_attribute_180_1_18"&gt;
              &lt;option value="0"&gt;---&lt;/option&gt;
              &lt;option value="119"&gt;Left&lt;/option&gt;
              &lt;option value="120"&gt;Right&lt;/option&gt;
              &lt;option value="121"&gt;Center&lt;/option&gt;
          &lt;/select&gt;
      &lt;/dd&gt;
  &lt;/dt&gt;
  </code></pre>