javascript focus problem
<p>I have a form with 3 fields. Country, state and users</p>

<p><img src="http://i.stack.imgur.com/beWVs.jpg" alt="none"></p>

<p>I am trying to do the following. when United states is selected as a country, the state field will show. The problem is that when i use the tab key on the keyboard, it is skipping the state field and its going on the users field. So i tried using the focus property so when i select United states, the state will show + selected, but I had no luck.. Below please find the code I am using</p>

<pre><code>$(document).ready(function () {

 $("#cmbCountries").change(function () {
    $("#cmbCountries option:selected").each(function () {
        if ($(this).text() == "United States") {               

            $("#cmbstate").show(); 
            $("#cmbstate").focus(); 

        }

        else {
            $("#cmbstate").hide();
        }
    });
}).change();   });
</code></pre>

<p>Any help please?</p>
