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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:52:35+00:00 2026-05-24T18:52:35+00:00

First, I request some HTML via AJAX. Example response: <tr class=recordRow> <td class=first recordType

  • 0

First, I request some HTML via AJAX.
Example response:

<tr class="recordRow">
  <td class="first recordType" id="recordType">holder</td>
  <td class="recordAmount" id="recordAmount">holder</td>
  <td class="recordDescription" id="recordDescription">holder</td>
  <td class="last recordDate" id="recordDate">holder</td>
</tr>

And I’m trying to make a DOM Object.

var d = document.createElement("div");
d.innerHTML = templateListItem;
alert(d.innerHTML);
alert(d.firstChild);

I thought this should add the row to the <div>, but I only get the text. When I append the response to an element, I only get the text content, e.g holder holder holder holder.

Why does the HTML seem to get squashed in firefox and chrome?

Added:
If example response are like:

<tr><td><span>something here..</span></td></tr>

It will alert “HTMLSpanElement” in firefox. All tags like tr/td/ are removed.

  • 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-24T18:52:35+00:00Added an answer on May 24, 2026 at 6:52 pm

    If you are trying to insert a <tr> into a <div>, it is possible that the browser will not render this properly as it is illegal HTML.
    Try placing your <tr> into a <table> element or a <tbody> element nested inside of a <table> element.

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

Sidebar

Related Questions

First some HTML: <div id=tmcl-request class=tmcl-request style=display: none> Request: <b> Node: </b><span id=node>33947</span> </div>
On click, I want to hide/show some html code(which is obtained via a GET
I'm using an AJAX request to handle some part of my app that deals
I have a web application where the first request may take a few seconds
Starting with no cache on server or client FIRST REQUEST GET /post/1 HTTP/1.1 HTTP/1.1
Why does it take forever for ASP.NET to process a request the first time
I have two list on my request on jsp. First one is productGroupName, and
I'm attempting to issue two concurrent AJAX requests. The first call (/ajax_test1.php) takes a
First off, I understand the reasons why an interface or abstract class (in the
I have three depending selects. First one, have some values. <select id=first> <option value=1>v1</option>

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.