Replacing An Amount in a Select Box Using Javascript
<p>OK, so I'm comparing 2 values on a webform, one is a text value, and one is in a select element.  When the text value is less than the dropdown I need the dropdown to change to the highest value lower than the one in the text box.</p>

<p>For example, if the user selects 2000 in the dropdown, and then enters 1100 in the text field, I would need the popup to return say 1000.</p>

<p>I wrote the beginnings of something I thought would work, but I can't tell if I should use a return command in conjunction with the dropdown field name, or something like field name (of popup) is &lt; text amount.  </p>

<p>Here is what I have so far.  If someone can just point me in the right direction, I would really appreciate it.</p>

<pre><code>function compareAmts () {
    if ($("#TCA_Field1").val() &lt; ("#TCA_Field2").val ) {
        ($("#TCA_Field2").val() ==
        );
    }
}
</code></pre>
