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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:41:04+00:00 2026-06-07T20:41:04+00:00

I have this JS function : $(#ctl00_ContentPlaceHolder1_Table3 td).click(function () { var varTemp; var tr

  • 0

I have this JS function :

 $("#ctl00_ContentPlaceHolder1_Table3 td").click(function () {

            var varTemp;
            var tr = $(this).parent();
            var temp = "";
            for (var i = 0; i < tr.children().length; i++) {
                if (tr.children().get(i) == this) {
                    var leColumn = i;
                    break;
                }
            }
            var tbody = tr.parent();
            for (var j = 0; j < tbody.children().length; j++) {
                if (tbody.children().get(j) == tr.get(0)) {
                    var leRow = j;
                    break;
                }
            }
            if (leColumn == 13) {
                var temp = $(this).text()
                var hwID = temp.split(" ");
                var hwIDFinal = parseInt(hwID[1]);
                PageMethods.getDetailHardware(HardwareID, hwIDFinal, CallSuccessUpdateHardware, CallFailedUpdateHardware);
                __doPostBack('#tblEquipementDetail', '')
            }
        });

It allows me to get the coordinate of a clicked cell on a generated table.

Thanks to that, I can call a PageMethod after.

What I would like to do before the end of this function, is to look for any checked checkboxes in the current line where I clicked my cell.

I’ve tried some stuff, but nothing successful so far. In fact, the best I can do is to select ALL the checked checkboxes, from the whole table.

I would like to select only those from the current row.

Here’s the code of the generated table.

<table id="ctl00_ContentPlaceHolder1_Table3" width="100%" style="font-family: 'Microsoft Sans Serif'; color: #000000">
            <tr>
                <td bgcolor="#000066" width="100%" style="color:white;">ID - Hardware</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Label</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Status</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Comment</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Loan Start Date</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Loan End Date</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Assigned by</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Assignment Date</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Revocation Date</td>
                <td bgcolor="#000066" width="100%" style="color:white;">Package</td>
                <td bgcolor="#000066" width="100%" style="color:white;">USBPhone</td>
                <td bgcolor="#000066" width="100%" style="color:white;">USBKeypad</td>
                <td bgcolor="#000066" width="100%" style="color:white;">ScreenPrivacy</td>
            </tr>
            <tr>
                <td>4477</td>
                <td>HH1234</td>
                <td>Affected</td>
                <td></td>
                <td></td>
                <td></td>
                <td>XXXXXXX</td>
                <td>19/08/2008</td>
                <td> / </td>
                <td><input name="ctl00$ContentPlaceHolder1$ctl184" type="checkbox" /></td>
                <td><input name="ctl00$ContentPlaceHolder1$ctl186" type="checkbox" /></td>
                <td><input name="ctl00$ContentPlaceHolder1$ctl188" type="checkbox" /></td>
                <td><input name="ctl00$ContentPlaceHolder1$ctl190" type="checkbox" /></td>
                <td><a onclick="DetailHardware(1234);return false;" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$ctl192','')" style="font-size:9pt;">Detail 5014</a></td>
            </tr>
            <tr>
                <td>3209</td>
                <td>XS548</td>
                <td>Ready</td>

ETC…

Any hint is welcome, thanks in advance 🙂

  • 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-07T20:41:06+00:00Added an answer on June 7, 2026 at 8:41 pm

    You already grab the tr parent of the clicked td, so just search within this:

    var row_checkboxes = tr.find('input[type=checkbox]');
    

    Also, on a point of efficiency, instead of binding multiple events, one for each td, it would be better to delegate the event to the table. The effect will be the same.

     $("#ctl00_ContentPlaceHolder1_Table3").on('click', 'td', function () {...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this function // add history paths and save data function AddPath( strTag,
I have this function: int firstHeapArray (IntHeapArray h) { if(!emptyHeapArray(h)) return h.array[0]; } It's
I have this function to create a request to another file to update the
I have this function: function validate($data) { $newData = str_replace(&nbsp;, , $newData); $newData =
I have this function that I would like to condense into some iterator. How
I have this function, and i animate via css a flipbox. How could i
I have this function which is supposed to set a certain time format to
I have this function above to create url slugs from posts title, the problem
I have this function in my js file. I need to give time for
I have this function in my onDestroy function and it's causing a crash: @Override

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.