jQuery select list issue
<p>I have a code something like </p>

<pre><code>    if($('#nodeNo').val() == null){
              cityChange(1);                      
              $('#nodeNo option[value=&lt;%=request.getAttribute("nodeval")%&gt;]').attr('selected','selected');
    }
</code></pre>

<p>There is an Ajax call in cityChange(1) to populate the nodeNo select list and then the next statement sets the selected value. However due to parallel execution the above code doesn't work. The ajax call and setting the value executes together. The other Ajax call takes a bit time and by that time the next statement finishes execution. Hence the list is populated correctly but the selected value can't be set.</p>

<p>Pls Help!!</p>
