Setting values to dropdown
<p>I'm using jQuery to load a dropdown based on another dropdown. I'm using the following code for this.</p>

<p>But the dropdown's two values are not properly set for the corresponding form id. Is there any problem in the following code?</p>

<p>Please check and let me know some solutions.</p>

<pre><code>$(document).ready(function() {
    dropdown1: $('#dropdown1').val()
    $('#dropdown1').change(function(e) {
        $.get("Search.do", {
            dropdown1: $('#dropdown1').val(),
              action: 'loaddropdown2'},function(variable){
                var wh=variable;
                alert(wh);
                $("#dropdown2").val(wh);
        });
    });
});
</code></pre>
