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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:45:41+00:00 2026-06-13T14:45:41+00:00

I have a 5 x 5 table. Each cell is an asp.net textbox. I

  • 0

I have a 5 x 5 table. Each cell is an asp.net textbox.
I want to get al the 5 textbox values of the last row with a non empty textbox.
For example:

enter image description here

This should get HELL O MY FRIE ND

But I get all the values BUT the last (ND). I don’t know why. Here’s my code:

// RIGHT HERE, $(this) referes to the whole table
$(this).find('input[value!=""]')
        // I get the last edited textbox
        .last()
        // Go up to the parent <td>
        .parent('td')
        .siblings('td')
        // I get all my brothers of type input 
        .children(':input')
        .each(function () {
            alert($(this).val());
        });

I am doing something wrong but what?
thank you.

  • 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-13T14:45:42+00:00Added an answer on June 13, 2026 at 2:45 pm

    The problem lies when you call .siblings() – that returns all other <td> elements that has the same parent as your currently selected <td> element. The problem can be solved by traversing up another step in the DOM and then selecting the children as has been shown by @Adrian, @Quintin Robinson, @Sushanth –, and @wirey.

    I figured that I would post an answer so you would have an explanation since all other answers solved your problem but didn’t explain what was wrong. And now here is how I would change your code 🙂

    $(this).find('input[value!=""]:last')
        .parents('tr')
        .find('td input')
        .each(function () {
            alert($(this).val());
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIButton that is created inside of each table cell. I want
On each cell of my table view I want to have a bar that
I have a 19 X 7 table with a textBox in each cell. Some
I want a table which each cell have different colours, which on mouse hover
I have a table view with bible verses on each cell. I want to
I am dynamically creating a table in C# with ASP.NET, and each row will
I have a table of data and each cell is a link. I want
I have a table view where I want a different image for each cell
I'm missing something fundamental here. I have a table view with each cell displaying
I have a table, with cells, and each cell has a data-type. I have

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.