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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:49:06+00:00 2026-05-31T12:49:06+00:00

I am having another problem with my table and checkboxes. I ahve gotten my

  • 0

I am having another problem with my table and checkboxes. I ahve gotten my javascript working which allows my checkbox to check when I click anywhere within the table cell. However, now the checkbox itself doesn’t work. I have tried to solve this for over an hour now, can’t find an answer anywhere. Here is my javascript and a snippet of the html it is manipulating:

function tdOnclick(td) {
    for(var i = 0; i < td.childNodes.length; i++) {
        if(td.childNodes[i].nodeName == "INPUT") {
            if(td.childNodes[i].checked) {
                td.childNodes[i].checked = false;
                td.style.backgroundColor = "#FAF4E3";
            } else {
                td.childNodes[i].checked = true;
                td.style.backgroundColor = "#E1E1E1";
            }
        }
    }
}

Here is a piece of the html for the table:

 <tr>
    <td><center>9:00 - 10:00</center></td>
    <td class="tdata" onclick="tdOnclick(this)"><input type="checkbox" name="free" value="mon09"></td>
    <td class="tdata" onclick="tdOnclick(this)"><input type="checkbox" name="free" value="tue09"></td>
    <td class="tdata" onclick="tdOnclick(this)"><input type="checkbox" name="free" value="wed09"></td>
    <td class="tdata" onclick="tdOnclick(this)"><input type="checkbox" name="free" value="thu09"></td>
    <td class="tdata" onclick="tdOnclick(this)"><input type="checkbox" name="free" value="fri09"></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-05-31T12:49:09+00:00Added an answer on May 31, 2026 at 12:49 pm

    Actually, I’m going to hazard the guess that it is working. Your click is checking the box, then the onClick event is unchecking it. Here’s an idea:

    <input type="checkbox" name="free" value="mon09" onClick="this.checked=!this.checked;">
    

    It’s a bit dirty, but it sucessfully ignores the click.

    Working TinkerBin.

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

Sidebar

Related Questions

having another problem with my javascript for my table. Basically, if you look at
The table I'm having problem with is pushed from another table controller, and there
I am having a problem with a table and showing another view when the
I saw the other topic and I'm having another problem. The process is starting
I'm having a problem inserting a less than sign < followed by another character
Actually, the problem is like this:- i am having a table, say Payments. I
i am having problem with setting the noOfRowsInSection in table view when displaying the
I am having a problem updating several rows of a mysql table using a
Im trying to copy contents from one table to another, both having identical table
I'm having a problem with UITableView, populated via Core Data. The table view is

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.