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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:51:01+00:00 2026-05-21T07:51:01+00:00

I have these check boxes that are created with a javascript function: I would

  • 0

I have these check boxes that are created with a javascript function:

enter image description here

I would like the text to appear to the right of the checkbox and all of the text to be on one line.

Here is the javascript function and the html:

function receiveAnswer(response) {
//  var aSeats = document.getElementById("aSeats");
//    aSeats.options.length = 0;// clear it out
//
//   for (var i = 0; i < response.aSeats.length; i++) { // add the items back in
//    var option = aSeats.appendChild(document.createElement("option"));
//    option.value = i;
//    option.appendChild(document.createTextNode(response.aSeats[i]));
//  }

  var aSeats = document.getElementById("aSeats");
    while (aSeats.childNodes.length > 0) { // clear it out
    aSeats.removeChild(aSeats.childNodes[0]);
  }

   for (var i = 0; i < response.aSeats.length; i++) { // add the items back in
    var input = aSeats.appendChild(document.createElement("input"));
    input.value = i;
    input.type = "checkbox";
    var br = aSeats.appendChild(document.createElement("br"));
    input.appendChild(document.createTextNode(response.aSeats[i]));
    var br = aSeats.appendChild(document.createElement("br"));
    var br = aSeats.appendChild(document.createElement("br"));
    var br = aSeats.appendChild(document.createElement("br"));
    var br = aSeats.appendChild(document.createElement("br"));
    var br = aSeats.appendChild(document.createElement("br"));
  }
}

html code:

<div name="aSeats" id="aSeats">
    <input type="checkbox">
</div>
  • 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-21T07:51:02+00:00Added an answer on May 21, 2026 at 7:51 am

    Create a separate div to put the text in and position that div to the side of the input box, something like:

    var div = document.createElement("div");
    div.style.width = 100;
    div.innerHTML = text;
    etc.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mini form that consists of all select boxes and checkbox lists.
I have about 20 check boxes. When the user selects these and then uses
I have a javascript function that checks for a date range. Is there any
I need to check a certain selection of checkboxes using JavaScript. All these checkboxes
I have some JavaScript/jQuery code that watches for the changed event on a checkbox:
Edited Post These are the new functions that I have created using your template
So I have this form that has tons of text boxes, combo boxes, etc.
I have a form field (a series of checkboxes) that's being created dynamically from
i have a datagrid (created programmatically) wich is connected to an JsonRestStore. In that
I have multiple tables on my page that contain a checkbox. Immediately following the

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.