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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:55:26+00:00 2026-06-07T09:55:26+00:00

I have used some AJAX to output HTML to a div. I thought the

  • 0

I have used some AJAX to output HTML to a div.

I thought the AJAX would let me display a table, but since it outputs to a div, turns out, it does not. <td> codes etc. are ignored. I know that table-less display is considered better, anyway, however I am very weak in CSS.

Can anyone suggest how to display the following simple output without tables. I mainly need to make columns line up when text is different length.

HTML

<div id="displayhere"></div>

Output I would like to go into div except not sure how to put table in div:

<tr><td colspan=2>Heading</td></tr>
<tr><td>Short text option 1</td><td><input type="checkbox"></td></tr>
<tr><td>Really long text Option 2</td><td input type="checkbox"></td></tr>
  • 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-07T09:55:27+00:00Added an answer on June 7, 2026 at 9:55 am

    All you need to do, in simplified form is:

    var output = '<tr><td colspan=2>Heading</td></tr><tr><td>Short text option 1</td><td><input type="checkbox"></td></tr><tr><td>Really long text Option 2</td><td><input type="checkbox"></td></tr>',
        table = $('<table />').appendTo('#displayhere'),
        tbody = $('<tbody />').html(output).appendTo(table);
    

    JS Bin demo.

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

Sidebar

Related Questions

I have used ElasticMapReduce for some time. It is quite convenient but I can't
I am new to MySQL, but I have used Oracle for some time. I
I have used fieldset tag in HTML page, whereby i need some text to
I have a view_mine_and_others.php file that outputs this html <div class=rec id=1> <div class=val>343</div>
I have used ajax with jquery 1.4.2 on my domain, but I need to
I have used jquery tabs for loading data with ajax, but I need to
I have a php page used for an Ajax call. It produces output in
I have used some jquery components in my web site, Suddenly i'm getting an
I have generally always used some sort of Hungarian Notation for my field names
I have used a generalized additive model to analyse some data and now wish

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.