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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:52:27+00:00 2026-06-15T11:52:27+00:00

I do have a form in which i have to country select box and

  • 0

I do have a form in which i have to country select box and two states select box.
in which when i click the first country the state of first country will be loaded. from there i can select the state. And i do have a check box on clicking that the same values that i have given in first country and state select box must be populated all state in the second state.

This is how i done it,

var val = $('#state_name_bill option:selected').html();
        var value = $('#state_name_bill option:selected').val();
        $("#state_name_user_0").append("<option value=" + value + ">" + val + "</option>");
        $("#state_name_user_0").val(value);

Is there any alter, note in both the state select box selected state must not be deselected

  • 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-15T11:52:30+00:00Added an answer on June 15, 2026 at 11:52 am

    Try like this,

    var get_hmtl = $('#state_name_bill').html();  // get all option tag
    var value = $('#state_name_bill option:selected').val(); // get selected value
    $("#state_name_user_0").html(get_hmtl); // fill get_html
    $("#state_name_user_0").val(value); // set selected value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form on my page which contains two select dropdowns. The first
I have a select list say of states in the country, which i have
I have a select element which will be displayed on mobile device <form> <select
i have some select options in my form which will post data to my
i have a registration form which contains a postalcode and a country drop down
i have an form which will send some data to an php file ,
I have a standard select box in my php form for my website containing
I have an InfoPath form which has two data connections: Connection to a SharePoint
I have a modal dialog box which is containing search field. when I select
I have a form which contains a dropdown list of countries generated from database.

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.