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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:41:56+00:00 2026-06-17T06:41:56+00:00

hello guys? can you please help with this? i have this tables in HTML.what

  • 0

hello guys? can you please help with this? i have this tables in HTML.what i want to achieve is that, when i click the row the checkbox will be checked and the row will be highlighted.and is it possible with the checkbox column hidden?

<table border="1" id="estTable">
<thead>
    <tr>
        <th></th>
        <th>Name</th>
        <th>Age</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td><input type="checkbox"></td>
        <td>Chris</td>
        <td>10</td>
    </tr>
    <tr>
        <td><input type="checkbox"></td>
        <td>Cass</td>
        <td>15</td>
    </tr>
    <tr>
        <td><input type="checkbox"></td>
        <td>Aldrin</td>
        <td>16</td>
    </tr>

</tbody>

</table>
<input type="button" value="Edit" id="editbtn"/>

<div id="out"></div>

and i have this javascript to get the values of the selected row.And i was hoping to print one row at a time.

 $('#editbtn').click(function(){

    $('#estTable tr').filter(':has(:checkbox:checked)').find('td').each(function() {
         $('#out').append("<p>"+$(this).text()+"</p>");
        });
});
  • 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-17T06:41:58+00:00Added an answer on June 17, 2026 at 6:41 am

    This gets a little easier when you use classes to add more context to your source:

    <tr>
        <td class="select hidden">
            <input type="checkbox">
        </td>
        <td class="name">Chris</td>
        <td class="age">10</td>
    </tr>
    

    Then you can do something like this:

    $(document).ready(function () {
        'use strict';
        $('#estTable tbody tr').click(function (e) {
            //when the row is clicked...
            var self = $(this), //cache this
                checkbox = self.find('.select > input[type=checkbox]'), //get the checkbox
                isChecked = checkbox.prop('checked'); //and the current state
            if (!isChecked) {
                //about to be checked so clear all other selections
                $('#estTable .select > input[type=checkbox]').prop('checked', false).parents('tr').removeClass('selected');
            }
            checkbox.prop('checked', !isChecked).parents('tr').addClass('selected'); //toggle current state
        });
        $('#editbtn').click(function (e) {
            var selectedRow = $('#estTable .select :checked'),
                tr = selectedRow.parents('tr'), //get the parent row
                name = tr.find('.name').text(), //get the name
                age = parseInt(tr.find('.age').text(), 10), //get the age and convert to int
                p = $('<p />'); //create a p element
            $('#out').append(p.clone().text(name + ': ' + age));
        });
    });
    

    Live demo: http://jsfiddle.net/Lf9rf/

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

Sidebar

Related Questions

Hello guys can you please help me with this problem. When a simple image
Hello guys I have 1675 line Code. Want to when user click button textbox.text
Hello guys what can be the reason for this: I have a folder wallpapers
Hello all I have a question I hope you guys can help me with.
Hello guys I have a List that I want to show for all users
Hello StackOverflow Community, I hope you guys can help me with this here: On
Hello Guys! I started learning python GUI development. Let's say I have this script:
Hello guys sorry if the question looks stupid to you. i have 3 tables
hello guys i have this function for focus : fav[jj].setOnFocusChangeListener(new View.OnFocusChangeListener() { public int
Hello guys can anyone help me with the issue im having with installation of

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.