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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:35:46+00:00 2026-05-25T03:35:46+00:00

I have two select elements. Making a choice on the first select will build

  • 0

I have two select elements. Making a choice on the first select will build the options for the second select. Works fine on desktop browsers.

On the iPhone, after you make your choice on the first one and chose “Next”, the options do not get filled in the second select. So far, the only ways to do this is to go from the second select, back to the “Previous” one and then back, “Next” to the second select. The other way to click “Done” and then tap the second select.

I’ve tried both .change() and .click() and both produce the same results.

Below is the JS and here is a working example http://damonomania.com/select/

Any suggestions? TIA!

$(document).ready(function(){

    $('#select-1').change(function() {
        show_options();
    });

    function show_options() {
        var id = $('#select-1').val();
        $('#select-2 option:gt(0)').remove();
        $.each(options[id], function(k,v) {
            $('#select-2').append('<option value="' + k + '">' + v + '</option>');
        });
    }
});

var options = {"17":{"835":"870","836":"871"},"18":{"435":"870","436":"871"},"13":{"1":"123546"},"19":{"1213":"4010","1206":"4015"}}
  • 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-25T03:35:47+00:00Added an answer on May 25, 2026 at 3:35 am

    I had the same problem on my site. I was able to fix it by manually polling the selectedIndex property on the select control. That way it fires as soon as you “check” the item in the list. Here’s a jQuery plugin I wrote to do this:

    $.fn.quickChange = function(handler) {
        return this.each(function() {
            var self = this;
            self.qcindex = self.selectedIndex;
            var interval;
            function handleChange() {
                if (self.selectedIndex != self.qcindex) {
                    self.qcindex = self.selectedIndex;
                    handler.apply(self);
                }
            }
            $(self).focus(function() {
                interval = setInterval(handleChange, 100);
            }).blur(function() { window.clearInterval(interval); })
            .change(handleChange); //also wire the change event in case the interval technique isn't supported (chrome on android)
        });
    };
    

    You use it just like you would use the “change” event. For instance:

    $("#mySelect1").quickChange(function() { 
        var currVal = $(this).val();
        //populate mySelect2
    });
    

    Edit: Android does not focus the select when you tap it to select a new value, but it also does not have the same problem that iphone does. So fix it by also wiring the old change event.

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

Sidebar

Related Questions

I have two columns. People have to select elements from the first column and
How do I select elements that have two attributes? I can do @name |
I have the following two columns: SELECT b.ip_address AS IP ,b.mask AS MASK FROM
Ok, I have two tables that I am joining and doing a select on
I have tried the following two statements: SELECT col FROM db.tbl WHERE col (LIKE
I have multiple selects: <select id=one> <option value=1>one</option> <option value=2>two</option> <option value=3>three</option> </select> <select
I have two elements: <input a> <input b onclick=...> When b is clicked, I
I have a picklist web interface: a pair of select elements with a pair
I have a form in HTML, that has several select elements, what is the
I have two select lists that each display users and two buttons (add and

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.