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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:54:47+00:00 2026-06-06T23:54:47+00:00

I am having issues to get the table data in the row if a

  • 0

I am having issues to get the table data in the row if a button is selected. I have two buttons approve and deny and based on what button user clicks I want to grab the data using query. can get the row numbers and stuff just not the row data. I need to get the id and tester.

here is what I have

<table id="mytable" width="100%">
<thead>
<tr>
<th>ID</th>
<th>Tester</th>
<th>Date</th>
<th>Approve</th>
<th>Deny</th>
</tr>
</thead>
<tbody>
<tr class="test">
<td class="ids">11565 </td>
<td class="tester">james</td>
<td>2012-07-02 </td>
<td><Button id="Approved" type="submit" >Approved</button>
</td>
<td><Button id="deny_0" type="submit" >Denied</button>
</td>
</tr>
</tbody>
</table>

here is my javascript to get the tr and td number but I am not sure how to use it to get what I need

$(document).ready(function() {  

    /*$('#cardsData .giftcardaccount_id').each(function(){

        alert($(this).html());
     }); */
    $('td').click(function(){
          var col = $(this).parent().children().index($(this));
          var row = $(this).parent().parent().children().index($(this).parent());
          alert('Row: ' + row + ', Column: ' + col);
         // alert($tds.eq(0).text());
          console.log($("tr:eq(1)"));
         // $("td:eq(0)", this).text(),

        });


});
  • 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-06T23:54:48+00:00Added an answer on June 6, 2026 at 11:54 pm
    $(document).ready(function(){
        $('#Approved').click(function(){
            var id = $(this).parent().siblings('.ids').text();
            var tester = $(this).parent().siblings('.tester').text();
    
            console.log(id);
            console.log(tester);
        });
    });​
    

    JSFiddle

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

Sidebar

Related Questions

I am having issues with a sql query. I have following table (I simplified
I'm just trying to get started with NDjango but am having issues running a
I'm trying to get the Mailchimp datasource from Springest working, and I'm having issues.
I am trying to get php's namespace technique down but having some issues here:
I'm trying to get started with twitter4r but I'm having some issues: Why I
all. I'm having issues with PayPal IPN integration where it seems I cannot get
I'm trying to get this to work, but I am having issues. What am
I have an application which is used for data analysis and I'm having a
I have a long table with columns of schedule data that I'm loading via
Hope someone can advise. Having issues trying to remove a row once a link

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.