jQuery using variable with string inside a selector
<p>This code prints about 15 rows of data with this select box near each row.  I need to capture user's selected value for each row to send it of to the next function.  I'm receiving this error: Uncaught TypeError: Object # has no method 'val'.  Is there a better way to achieve this?</p>

<pre><code>count = 1;
$.each(data, function(index, element) {
    $('&lt;div class="hd_field"&gt;Payment Format: &lt;select name="Payment_Format" id="Payment' + count + '" class="Payment_Format"&gt;&lt;option value="CTX" selected="selected"&gt;Company to Company&lt;/option&gt;&lt;option value="PPD"&gt;Company to Person&lt;/option&gt;&lt;/select&gt;&lt;div id ="Selected_Format' + count + '"&gt;&lt;/div&gt;&lt;/div&gt;').appendTo(newDiv3);
    $('select#Payment' + count).change(function() {
        alert(this.val());
        PaymentFormat = $(this).val();
        element.PmtRec.PmtFormat = PaymentFormat;
        $('#Selected_Format' + count).text(PaymentFormat);
    });
    console.log(data);
    count = count + 1;
});​
</code></pre>
