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

  • SEARCH
  • Home
  • 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 8447537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:12:07+00:00 2026-06-10T10:12:07+00:00

I have 2 drop down menus, I want this: when I choose option in

  • 0

I have 2 drop down menus, I want this: when I choose option in the dropdown menu called “ItemCountry”, the div id=”StateFeeder” will load a certain dropdown menu in another page according to the value in the first menu.

this is the first menu:

<label for="ItemCountry">Country <span class="req">*</span></label>
<select name="ItemCountry" id="ItemCountry" class="cat_dropdown" onblur="StateFeeder()">
    <option value=" ">-- Select Country --</option>
    <option value="AU" selected="selected">Australia</option>
    <option value="CA">Canada</option>
    <option value="CN">China</option>
    <option value="NZ">New Zealand</option>
    <option value="RU">Russia</option>
    <option value="US">United State</option>
</select>

and this is the second menu:

<div id="StateFeeder">
    <div>
        <label for="ItemState">State <span class="req">*</span></label>
        <select name="ItemState" id="ItemState" class="cat_dropdown">
             <option value="">-- Please select --</option>
             <option value="NSW">NSW</option>
             <option value="VIC">VIC</option>
             <option value="QLD">QLD</option>
             <option value="ACT">ACT</option>
             <option value="TAS">TAS</option>
             <option value="WA">WA</option>
             <option value="SA">SA</option>
             <option value="NT">NT</option>
         </select>
         e.g. NSW         
    </div>
</div>

the jquery I wrote but it is not working:

<script type="text/javascript">
    $(function() {
        $('#ItemCountry').change(function() {
            if (document.ItemCountry.selectedIndex == 'AU') {
                $("#StateFeeder").empty().html('<img src="/images/mapCountry /AU/ajaxloader.gif" class="IMG-Loading" />');
                $('#StateFeeder>div').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-AU');
            };
            if (document.ItemCountry.selectedIndex == 'CA') {
                $("#StateFeeder>div").empty().html('<img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" />');
                $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-CA');
            };
            if (document.ItemCountry.selectedIndex == 'CN') {
                $("#StateFeeder").empty().html('<img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" />');
                $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-CN');
            };
            if (document.ItemCountry.selectedIndex == 'NZ') {
                $("#StateFeeder").empty().html('<img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" />');
                $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-NZ');
            };
            if (document.ItemCountry.selectedIndex == 'RU') {
                $("#StateFeeder").empty().html('<img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" />');
                $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-RU');
            };
            if (document.ItemCountry.selectedIndex == 'US') {
                $("#StateFeeder").empty().html('<img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" />');
                $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-US');
            };
        });
    });
</script>
  • 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-06-10T10:12:09+00:00Added an answer on June 10, 2026 at 10:12 am

    selectedIndex returns the index of the selected option, you should use the value property:

     $(function() {
         $('#ItemCountry').change(function() {
             var val = this.value; // value of the select element
             $("#StateFeeder").html('<img src="/images/mapCountry/AU/ajax-loader.gif" class="IMG-Loading" />');
             $('#StateFeeder').load('/StateFeeder/StateFeeder-Buy.html #StateFeeder-'+val);
         })
      })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implenmented drop-down lists Select menus in jQuery Mobile. <div data-role=fieldcontain> <label for=name
My problem is: I have a drop down menu and i want that when
So I wrote a carousel in jQuery, but I want to have drop-down menus
I have a form with two drop down menus and I want the selectable
Hi I have two dropdown menus: priceMaximum and mortgageMaximum I want it so if
I have a CSS dropdown menu that is functioning how I want it to
I have 2 drop-down menus (select1 and select2) and 1 input text (rate). When
I have two drop down menus where the options are not get from the
I have a drop down menu which you can see here on jsfiddle .
I have a drop down menu. Has product types. Product types have associated value

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.