Multistep form - strange behaviour with field filled by jquery
<p>I have problem with script who filled <code>input</code> field when one value is less than 4. When the value is less than 4 the script filling field but the value is not <code>selected</code>, so when I'm going to next step I have no value in this field. When the value is greater than 4 everything is ok (the value is also filling by jquery).</p>

<p>This is my code:</p>

<pre><code>function compute() {
      if( parseInt($("#finish_day").val()) &lt; 4 ) {  
            $('#return_car').children('#return_car option[value=' + $('#get_car').val() + ']').attr('selected', true).siblings().attr('disabled', true);

            if ($('#return_car').val()) $('#return_car').change();
        }
        else {
            $('#get_car &gt; option, #return_car &gt; option').prop('disabled', false);
            $('#three_day').hide(2000, function () {
                $(this).remove();
            });
        }

    }
$('select#get_car').change(compute);
$('input#finish_day').change(compute);
</code></pre>

<p>HTML code:</p>

<pre><code>&lt;form&gt;    
&lt;fieldset&gt;    
&lt;div class="type-select"&gt;   
    &lt;label for="get_car"&gt;Miasto wynajmu: *&lt;/label&gt;
    &lt;select id="get_car" name="rent-a-car-next[get_car]" class="select"&gt;
        &lt;option value=""&gt;---&lt;/option&gt;
        &lt;option value="Katowice"&gt;Katowice&lt;/option&gt;
        &lt;option value="Kraków"&gt;Kraków&lt;/option&gt;
        &lt;option value="Warszawa"&gt;Warszawa&lt;/option&gt;
        &lt;option value="Wrocław"&gt;Wrocław&lt;/option&gt;
        &lt;option value="Gdańsk"&gt;Gdańsk&lt;/option&gt;
    &lt;/select&gt;   
&lt;/div&gt;

&lt;div class="type-select"&gt;   
    &lt;label for="return_car"&gt;Miasto zwrotu: &lt;/label&gt;
    &lt;select id="return_car" name="rent-a-car-next[return_car]" class="select"&gt;
        &lt;option value=""&gt;---&lt;/option&gt;
        &lt;option value="Katowice"&gt;Katowice&lt;/option&gt;
        &lt;option value="Kraków"&gt;Kraków&lt;/option&gt;
        &lt;option value="Warszawa"&gt;Warszawa&lt;/option&gt;
        &lt;option value="Wrocław"&gt;Wrocław&lt;/option&gt;
        &lt;option value="Gdańsk"&gt;Gdańsk&lt;/option&gt;
    &lt;/select&gt;   
&lt;/div&gt;

&lt;div class="type-text"&gt;
  &lt;label for="finish_day"&gt;Ilość dni wynajmu: &lt;/label&gt;
  &lt;input type="text" size="20" id="finish_day" name="rent-a-car-next[finish_day]" value="" readonly="readonly" /&gt;
&lt;/div&gt;

&lt;div class="type-button"&gt;
  &lt;input type="submit" name="rent-a-car-next[step-2-next]" class="button submit" value="Kolejny krok" /&gt;
&lt;/div&gt;

&lt;/fieldset&gt;
&lt;/form&gt;
</code></pre>

<p>Where is the problem? Thanks for any help</p>
