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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:46:27+00:00 2026-05-24T16:46:27+00:00

I have two select controls that I want to populate with the exact same

  • 0

I have two select controls that I want to populate with the exact same options.

I started with the following code (which does not work):

var result = // raw <option></option> html from ajax call

$("#selImbServiceType").html(result);
$("#selRemitImbServiceType").html(result);

If I comment out either of the statements above then the one left works, but when they are both uncommented only the first one works.

Then I changed the code to the following (this works as expected):

var result = // raw <option></option> html from ajax call

$("#selImbServiceType,#selRemitImbServiceType").html(result);

The second version populates both controls.

I am using jQuery 1.4.4 with Firefox 5.0.1

Any idea why the first version does not work?

result variable HTML

Here is the contents of the result variable:

<option value="27b3dc65-d60c-46e3-8d9c-bdffad8bc25f">Return To Sender</option>
<option value="bcf435c9-d197-4a54-8d90-f4507c2ac505">Shred And Return Electronically</option>

Surrounding HTML

<div style="overflow:auto;width:100%;">
  <div style="float:left;width:50%">
    <span class="dialogControlLabel">Client</span>
    <br />
    <select id="listClients" onchange="clientSelectionChanged()"></select>
    <span id="spanClientsLoading" style="display:none;"><img src="/Theme/Images/ajax-loader-fb.gif" alt="loading" width="16" height="11" /></span>
    <br />
    <br />
    <span class="dialogControlLabel">IMB Service Type</span>
    <br />
    <select id="selImbServiceType" name="imbServiceType"></select>
    <br />
    <br />
    <span class="dialogControlLabel">Stream Name</span>
    <br />
    <input id="txtStreamName" type="text" maxlength="128" name="streamName" />
    <br />
    <br />
    <span class="dialogControlLabel">Processor Module</span>
    <br />
    <input id="txtProcessorModule" type="text" maxlength="256" name="processorModule"/>
    <br />
    <br />
    <span class="dialogControlLabel">Advanced Location Logic Enabled</span>
    <br />
    <select id="selAdvancedLocationLogicEnabled" name="advancedLocationLogicEnabled">
      <option value="1">Yes</option>
      <option value="0">No</option>
    </select>
    <br />
    <br />
    <span class="dialogControlLabel">Force Mail Enabled</span>
    <br />
    <select id="selForceMailEnabled" name="forceMailEnabled">
      <option value="1">Yes</option>
      <option value="0">No</option>
    </select>
  </div>
  <div style="float:right;width:50%">
    <span class="dialogControlLabel">File Stream Configuration</span>
    <br />
    <select id="selFileStreamConfig"></select>
    <br />
    <br />
    <span class="dialogControlLabel">Remit IMB Service Type</span>
    <br />
    <select id="selRemitImbServiceType" name="remitImbServiceType"></select>
    <br />
    <br />
    <span class="dialogControlLabel">NCOA Enabled</span>
    <br />
    <select id="selNcoaEnabled" name="ncoaEnabled">
      <option value="1">Yes</option>
      <option value="0">No</option>
    </select>
    <br />
    <br />
    <span class="dialogControlLabel">Skip Logic Enabled</span>
    <br />
    <select id="selSkipLogicEnabled" name="skipLogicEnabled">
      <option value="1">Yes</option>
      <option value="0">No</option>
    </select>
    <br />
    <br />
    <span class="dialogControlLabel">Active</span>
    <br />
    <select id="selActive" name="active">
      <option value="1">Yes</option>
      <option value="0">No</option>
    </select>
  </div>
</div>
  • 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-24T16:46:28+00:00Added an answer on May 24, 2026 at 4:46 pm

    Well, I would maybe try to update your jQuery version.

    See this example

    I’m using jQuery 1.5 and it’s working

    EDIT: weird, it works with 1.4.4, too

    I’d try to look on ajax result, if it’s exactly same and you could also try to hardcore your ajax result

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

Sidebar

Related Questions

I have two lists and I want to select items that are not in
I have two tables that I am joining with the following query... select *
I have the following two columns: SELECT b.ip_address AS IP ,b.mask AS MASK FROM
I have the following two queries: select count(*) from segmentation_cycle_recipients scr , segmentation_instance si
I have two queries, as following: SELECT SQL_CALC_FOUND_ROWS Id, Name FROM my_table WHERE Name
I have two table emptable1(empid,status) emptable2(empid,week) i want to select all the empid whose
So I have an ASP.NET page with two controls: a GridView which displays rows
I currently have a couple different user controls that provide the same functionality: three
I have two tables that both have an ID number which are linked together
I have two select lists, I would like jquery to either remove or disable

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.