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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:19:46+00:00 2026-05-31T16:19:46+00:00

I have a table where each rows has a check box. This code works

  • 0

I have a table where each rows has a check box.

This code works for another table:

    jQuery('#my_table_id tr').has(':checkbox:checked').closest('tr').each(function() {
      request_arr[i] = jQuery(this).attr('id');
      i++;
    });

Now in this case, I have a table object:

    var tbl = $('#my_table') // In my code, this is done dynamically

    // This does not work
    jQuery(tbl + 'tr').has(':checkbox:checked').closest('tr').each(function() {
      request_arr[i] = jQuery(this).attr('id');
      i++;
    });

How can I get checked rows using a table object like tbl?
I’ve tried various drilldowns, but I can’t get any to work.

Update

This is how I’ve set up my html:

<table id="t1"></table>

<div class="bulk_action">
  <div title="Remove requests" class="trash_iconset_grey_16px removeRequest"></div>
  <div title="some other button" class="abc"></div>
</div>

<table id="t2"></table>

<div class="bulk_action">
  <div title="Remove requests" class="trash_iconset_grey_16px removeRequest"></div>
  <div title="some other button" class="abc"></div>
</div>

Clicking the “button” below table 1, will set tbl = <table id="t1">.

@elcanrs solution will also fetch checked rows in table nr 2. I only want checked rows for table nr 1.

  • 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-31T16:19:47+00:00Added an answer on May 31, 2026 at 4:19 pm

    jQuery(tbl + 'tr') is the same as $($('#my_table') + 'tr') which makes no sense. Do this instead:

    tbl.find('tr')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this kind of table, it has many rows and each row has
I have a table style page with rows. Each row has a checkbox. I
I have a table with multiple rows. Each row has a check button. How
I have a table with misc. data. Each row has a checkbox. This table
I have a table with 3 rows. Each row has 3 td. The first
I have a table with one column and four rows. Each tr has a
In each table have many number of rows with amount. Like this i have
I have a table with rows in, and each row has a few <td>
I have a table with multiple rows, each having it's own checkbox. I have
I have a table of 50 odd rows with 11 columns. Each row has

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.