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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:51:38+00:00 2026-06-04T12:51:38+00:00

I have an application here for you to be able to see the layout

  • 0

I have an application here for you to be able to see the layout of a problem I am having. When you open the application, if you click on the “Add Question” button, you will see that it displays a table row with three columns showing the content.

The first column shows Options textbox, second is a number textbox and third is 2 buttons. The problem is that it is displaying three columns in row going side by side.

It should be instead be showing within the table row, three rows, not three columns.

So currently it is showing this for each table row:

Option Textbox | Number Textbox | 2 Buttons

Instead it should be inside a table row:

Option Textbox

Number Textbox

2 Buttons

So like I said, I need three rows within the row, not three columns. But how can i achieve this with the code I have below:

var $tbody = $('#qandatbl > tbody'); 
            var $tr = $("<tr class='optionAndAnswer' align='center'></tr>");
            var $noofanswers = $("<tr><td class='noofanswers'></td></tr>");
            var $options = $("<tr><td class='option'></td></tr>");
            var $answer = $("<tr><td class='answer'></td></tr>");
            var $extratr = $("<tr></tr>");

        /*Below is an example of a function that worked before I included the <tr> tag
 but stopped working after including the <tr> tags */

      $('.numberAnswerTxt', context).each(function() {
            var $this = $(this);
            var $noofanswersText = '';

            if ($questionType == 'True or False' || $questionType == 'Yes or No'){

        $noofanswersText = $("<span class='naRow string' style='display: block;'>Only 1 Answer</span><input type='text' class='numberAnswerTxtRow answertxt' style='display: none;' onkeyup='numberKeyUp(this)' onkeypress='return isNumberKey(event)' onChange='getButtons()'>").attr('name', $this.attr('name')).attr('value', $this.val());

        }else{

        $noofanswersText = $("<span class='naRow string' style='display: none;'>Only 1 Answer</span><input type='text' class='numberAnswerTxtRow answertxt' style='display: block;' onkeyup='numberKeyUp(this)' onkeypress='return isNumberKey(event)' onChange='getButtons()'>").attr('name', $this.attr('name')).attr('value', $this.val());  

        }

            $noofanswers.append($noofanswersText);

            }); 

            $tr.append($extratr);
            $extratr.append($options);
            $extratr.append($noofanswers);
            $extratr.append($answer);
            $tbody.append($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-04T12:51:39+00:00Added an answer on June 4, 2026 at 12:51 pm

    A table row is denoted by an opening and closing tr so you need to make this change:

    var $noofanswers = $("<tr><td class='noofanswers'></td></tr>");
    var $options = $("<tr><td class='option'></td></tr>");
    var $answer = $("<tr><td class='answer'></td></tr>");
    

    each of those will create a row in your table.

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

Sidebar

Related Questions

Here's the core problem: I have a .NET application that is using COM interop
I have a Jsfiddle application here . If you type in a question in
here is a good question: I have an application compiled for iPhone OS 2.21.
I have a question here regarding iPhone app submission. I have a free application
Here is the issue I am having: I have a large query that needs
I have an application that depends on a 3rd party open source project hosted
Here is the scenerio: We have an application running on Webphere Portal Server 6.1
I have an application I need to analyze. I have the source code here.
Kinda stuck here... I have an application with lets say 5000 rows of data
I think I am at a impasse here. I have an application I built

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.