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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:23:08+00:00 2026-06-15T22:23:08+00:00

I have an Ajax functions which returns html markup. I need to extract a

  • 0

I have an Ajax functions which returns html markup. I need to extract a certain div form the entire string and replace that same div in my current html.
this is part of the code:

$.ajax({
        type: "POST",
        url: postUrl,
        dataType: "HTML",
        data: "ddd"
        success: function(htmlResponse) {
                //replace the html code
                $('#somediv').html($('#somediv' htmlResponse).html());
            }
        },

Works fine in Chrome and FF, not in IE 8. IE doesn’f find the div in the htmlResponse. i tried alerting:

alert($(htmlResponse).find('#somediv').html());

and got a blank message.
Is this a bug in IE, is anything wrong in my code?
Thanks 8

  • 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-15T22:23:10+00:00Added an answer on June 15, 2026 at 10:23 pm

    Regarding the alert, I can’t think of why IE would break on alert($(htmlResponse).find('#somediv').html()); unless the html() that was grabbed was just oversized / too much whitespace / empty in the first place.

    However, on this line:

    $('#somediv').html($('somediv' htmlResponse).html());
    

    did you mean:

    $('#somediv').html($('#somediv', htmlResponse).html());
    

    ?

    Edit:

    It might be a good idea to analyze the HTML in htmlResponse, and make sure it is well formed. Maybe a <div> doesn’t close, or other invalid syntax that IE8 is having trouble with.

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

Sidebar

Related Questions

I have an ajax call which returns me following response: <div class=content> <script language=JavaScript>
I have a php function which returns JSON in response to a ajax request
Working on an AJAX website (HTML,CSS,JavaScript, AJAX, PHP, MySQL). I have multiple javascript functions
I have an index.html file that calls main.php which returns a json object just
I have a form in which I need to call two action methods, one
I have an ajax call in jquery which returns 4 different arrays. 3 of
I have an ajax call to fetch information from Flickr API which returns JSON
I have an ajax call which returns a partial view which I want to
I have a simple ajax query to a file which basically returns in JSON
I have a table in HTML and I have some jquery functions which I

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.