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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:29:44+00:00 2026-06-15T17:29:44+00:00

After an AJAX request I get a string with some HTML data like this:

  • 0

After an AJAX request I get a string with some HTML data like this:

var test = '<div id="test-options"><option value="">Select</option><option value="true@153237119">XS</option><option value="true@153237120">S</option><option value="true@153237121">M</option><option value="true@153237122">L</option><option value="true@153237123">XL</option><option value="true@153237124">XXL</option></div><div class="athoerstuff">Ather stuff here</div>';

I want to append this and after it’s appended get only the content of div without the wrapper:

var li = $(test).appendTo('form');


$("body").find('#test-options').html();

——————————-

The problem was coming only on IE9 because the options without having the wrapper.
IE9 was looking at the options inside the div and realized that this is invalid. That is why, IE9 was not getting me the options.

I added a select wrapper in the server side script where I was making the request (option values) and, instead of:

$('#test-options').html();

I added:

$('#test-options select').html();

The result result was same as previous code, but now working on IE9 as well.

Thank you all for your help.

Maybe somebody can tell me why IE9 is not getting the options without the select wrapper and other browsers do?

  • 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-15T17:29:45+00:00Added an answer on June 15, 2026 at 5:29 pm

    If you are trying to get the options html then you can simply do like below,

    $(test).unwrap().html();
    

    instead of appending to body and retrieving the content.

    http://jsfiddle.net/XYhbg/

    The above is under the assumption with the data that you had in the test variable. Let me know if it is any different.

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

Sidebar

Related Questions

Ok so after an AJAX Get request 'success' is called and the string 'data'
I'm sending ajax request and i have appended the result on a div. After
i was wondering how/where to write a callback function after an ajax request is
I want to clear textbox after ajax posting. <div style=padding: 5px; background-color: Silver;> @using
I want to clear textbox after ajax posting. <div style=padding: 5px; background-color: Silver;> @using
I'm new with jqTree and I'd like to reload the tree after ajax call.
This is my ajax function: function ajax_call(call_method,data_to_send) { logger(function ajax_call. var data_to_send: ); logger(data_to_send);
I have a form that triggers an ajax request to a view after the
I am fetching 2 div's from a page using $.post jQuery AJAX request. Now
I'm trying to make a proxy-like page that forwards an AJAX request to a

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.