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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:33:52+00:00 2026-06-08T02:33:52+00:00

I am doing a Ajax call with jquery and putting the content inside a

  • 0

I am doing a Ajax call with jquery and putting the content inside a div like this:

$('#replace').html(response);

But it is not replacing all the content I got from ‘response’.

When I do :

alert(response)

I see all the HTML code with no problem.

But when I do:

$('#replace').html(response);

It does not put all the HTML code from response.

When I do an alert

alert(response);

I got this (which is correct):

#

    <div id='replace'>      
            <tr onclick='javascripot:gravaJOBparaView(5746);' ondblclick='fnOpen(5746);' >
                      <td class='preview' title='8746' >8746</td>
                      <td>XXXX</td>
                      <td>xxxxx</td>
                      <td>xxxx</td>
                      <td>xxx</td>
                  <td>xxxxx</td>
                  <td title='xpto'>XXXXXX</td>
                  <td></td>
                  <td> <br/>18:00</td>
                  <td>22/07/2012</td>
                  <td title='Check XXXXX' class='popups' ><a href='#popup_5746'><img src='xpto.png'  alt='Check XXXXXX' width='40px'></a></td>

        </tr>   
  </td>

#

But When I do the:

$('#replace').html(response);

It puts this code in the div ‘replace’:

#

   <div id="replace">       

                  8746
                  XXX
                  XXXX
                  XXXX
                  XXXXX
                  XXXXX
                  RXXXXXX

                   <br>18:00
                  22/07/2012
                  <a href="#popup_5746"><img width="40px" alt="Check XXXXX" src="xxxxxx.png.png"></a>
  </div>

#

As you can see for some reason it does not put all the tags from response.

What should I 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-08T02:33:54+00:00Added an answer on June 8, 2026 at 2:33 am

    Your HTML isn’t valid. <tr> must be in a table tag.
    Replace

    <div id='replace'>
    

    by

    <table id='replace'>
    

    Replace the last </td> by a </table>

    http://jsfiddle.net/wk4eD/1/

    Two element must not have the same id in your page

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

Sidebar

Related Questions

I am doing an AJAX call that returns some HTML and jQuery: <div id='selected'>Here
Not sure what I'm doing wrong but I can't get my JQuery AJAX call
I am doing an Ajax call which pulls some HTML in to a Div.
I am doing an Ajax call and on response I would like to hide
I'm doing a jQuery Ajax call to a PHP script that returns this string
I am doing Ajax call using jQuery and my URL is like http://localhost;3327/DummyAps/Demo.aspx In
i am doing an ajax call and i refresh a partial view. Inside the
I am doing an ajax call using jquery to get data in json format.
I'm doing an jQuery ajax call to an XML page in my CakePHP site.
I am using jQuery ajax call to return data as html to an empty

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.