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 7177165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:39:21+00:00 2026-05-28T16:39:21+00:00

In a previous question i made Dynamic dependent select menus i posted this example

  • 0

In a previous question i made Dynamic dependent select menus i posted this example code: http://jsfiddle.net/Bs5Db/50/.
This is the HTML version of the particular jquery script.
The user @jSweazy helped me pointing that i should update the jquery.uniform script every time i select a new state from the first menu.
The working version of the example is here: http://jsfiddle.net/Bs5Db/53/.
I know that the default option is too large for the menu but that is easily fixed….

My problem now is that i actually use the PHP version of the script. In that version updating the jquery.uniform with $.uniform.update(); doesnt do the trick. Actually the second menu isnt visible anymore when i insert the update command.

The PHP version is the following…

 $(document).ready(function(){
 function populate() {
 if($('#state').val() == 'AK' || $('#state').val() == 'DC') // Alaska and District     Columbia have no counties
{
   $('#county_drop_down').hide();
   $('#no_county_drop_down').show();
    } else {
   fetch.doPost('../getCounties.php');
   }
  }
  $('#state').change(populate);
  var fetch = function() {
  var counties = $('#county');
  return {
  doPost: function(src) {
 $('#loading_county_drop_down').show(); // Show the Loading...
 $('#county_drop_down').hide(); // Hide the drop down
 $('#no_county_drop_down').hide(); // Hide the "no counties" message (if it's the case)
 if (src) $.post(src, { state_code: $('#state').val() }, this.getCounties);
    else throw new Error('No SRC was passed to getCounties!');
},

getCounties: function(results) {

    if (!results) return;
            var allCounties = $("<option value=\"All\">All Counties</option>");
  counties.html(results);
  counties.prepend(allCities);
  counties.val("All").attr('selected',true);


$('#loading_county_drop_down').hide(); // Hide the Loading...

$('#county_drop_down').show(); // Show the drop down

}   
 }

 }();

 populate();
 });

The getCounties.php that is querying the database and retrieves the counties of each state works fine.
state and county are the names of the two select menus.
So if anyone can give me an advice of how to achieve the update of the counties menu in this version of the script i would be grateful.
Thanx in advance for taking the time to read!

  • 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-28T16:39:22+00:00Added an answer on May 28, 2026 at 4:39 pm

    I realized that even in this case you have to update the jquery.uniform but since there are other styled elements such as radio buttons, checkboxes etc.
    You have to insert $.uniform.update(‘select’).So the last part of the code becomes…

     $('#loading_county_drop_down').hide(); // Hide the Loading...
     $.uniform.update('select')
     $('#county_drop_down').show(); // Show the drop down
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is directly related to my previous question ASP.NET AJAX Is it possible
This question is related to a previous question of mine That's my current code
THis is a followup to my previous question Font-dependent control positioning. It's an attempt
this question is an extension to a previous question i asked (and was answered).
This question follows on from a previous question, that has raised a further issue.
This question is related to my previous question How to generate Cartesian Coordinate (x,y)
This question is related to my previous question . The storyline: I have an
This question is a continuation of my previous question here zend models architecture (big
This question is a follow up to my previous question about getting the HTML
In a previous question , I made a bit of a faux pas. You

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.