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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:37:19+00:00 2026-05-12T19:37:19+00:00

I have a table, containing rows, contaning cells – and some of them contain

  • 0

I have a table, containing rows, contaning cells – and some of them contain an img as follows:

<img id="FormView1_btnSave_row1%1%new" style="border-width: 0px; cursor: pointer;"
src="grafik/ok_16x16.gif" onclick="cleverStuff(this)"/>

In the function cleverStuff I would like to operate on the line that follows the line in which the button was clicked – this special button is contained in the last visible line only, there are a bunch of hidden lines below and I want to make the first hidden line visible – but I fail at getting to the next line.
My understanding was that all combination of parent() and next() could be used to get from the img to the td, to the tr and finally to the next tr.
So I tried to verify this:

$(ctrl).attr('id') correctly returns the img’s id 🙂

$(ctrl).parent().attr('id') returns NULL.

What am I missing here?

  • 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-12T19:37:19+00:00Added an answer on May 12, 2026 at 7:37 pm

    This should give you the enclosing tr of the element, even if it isn’t the element’s direct parent, then that row’s next row. if you use parent on an element that is inside a td, it will give you the column, not the row. Supplying a filter to the parent() method will simply filter out the parent unless it happens to match the filter, typically resulting in no matching elements. Closest is probably what you want, but parents(‘tr’) might be needed if you have nested tables and want the outer row instead of the inner row.

    $(this).closest('tr').next('tr')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table containing data about some users. Many of them use our
I have a table containing 60 million rows. The structure is like entryid, date,
We have a large table (450 million rows containing 34 columns of numeric or
I've got a table containing many rows. The rows are guaranteed to have been
I have an HTML table containing a few rows (this is built dynamically). All
I have a MySQL-InnoDB table with 350,000+ rows, containing a couple of things like
I have a very large HTML table containing 1500 rows (markup produced by PHP).
I have a table containing a large number of rows. Each row has 2
Lets say I have a table containing several hundred million rows that looks something
I have got a table containing rows of related data which I need to

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.