Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 670635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:17:09+00:00 2026-05-14T00:17:09+00:00

I have a 3 dropdowns: countries, states, and cities. States and cities are dependent

  • 0

I have a 3 dropdowns: countries, states, and cities.

States and cities are dependent of the previous form and loaded via AJAX.

In Firefox and Chrome everything is ok, but in IE (8 in my case) when I select a state, the cities dropdown isn’t loaded. It is like IE don’t detect the change. It is not a load problem, because I have tested with a simple alert box.

Any help will be really appreciated.

The states loaded page is similar to:

<select id="woeid_state">
<option value="1">Alabama</option>
<option value="2">Florida</option>
</select>

The cities loaded page is similar to:

<select id="woeid_town">
<option value="100">Miami</option>
<option value="101">Orlando</option>
</select>

The JS

$(document).ready(function()
 {
    function loadStates( parent_woeid )
    {
        $('#states').load("<?php echo $states_page?>"+parent_woeid);
        return false;           
    }

    function loadCities( parent_woeid )
    {
        $('#towns').load("<?php echo $cities_page;?>/admin1/"+parent_woeid);
        return false;           
    }   

    $("#woeid_country").change(function()
    {
        //alert("I am an alert box");
        var country = $("select#woeid_country").val();
        loadStates ( country);
    });

    $("#states").change(function()
    {
        //alert("I am an alert box");

        var admin1 = $("select#woeid_state").val();
        loadCities ( admin1 );
    }); 

});     

The form:

            <form class="ordinary_form" method="post" action="">
                <label>Country</label>

                <select name="woeid_country" id="woeid_country">
                                        <option value="23424975">United Kingdom</option>
                                        <option value="23424977">United States</option>
                                        <option value="23424979">Uruguay</option>
                                        <option value="23424980">Uzbekistan</option>
                                        <option value="23424907">Vanuatu</option>
                                        <option value="23424982">Venezuela</option>
                                        <option value="23424984">Vietnam</option>
                                    </select>

                <label>State/Province</label>
                <div id="states"></div>

                <label>City</label>
                <div id="towns"></div>
        </form>

UPDATE: usign JQuery 1.3

SOLUTION: brought by Daniel: replace the .change for .click

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:17:09+00:00Added an answer on May 14, 2026 at 12:17 am

    It’s counter-intuitive, but you need to use .click() instead of .change(). Internet Explorer doesn’t fire the change event until the dropdown loses focus, while the other browsers fire change each time the value changes.

    See this related Stack Overflow question: Getting jQuery to recognise .change() in IE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a countries, states, cities tables , and I need 3 dropdown menus
I have Cascading Dropdowns, populated via jquery ajax. Follow the link to get the
I want to have countries and cities dropdowns to my site. I've found this
I have a form with 4 dropdowns on it. The default selected option in
I have a form with multiple dropdowns consisting of multiple values. I'm trying to
I have two dropdowns in my form. The first one Queries for a set
First of all, I have already readed this: Validating form dropdown in CodeIgniter But
I have the dropdowns in my Create() View working perfect. But in the Edit()
I have a dropdown of countries, and an address form. Depending on the country
I have 3 dropdowns on a form for the user to choose their birthday.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.