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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:07:08+00:00 2026-06-14T11:07:08+00:00

In an ASP.NET web page, I have a table that shows results from a

  • 0

In an ASP.NET web page, I have a table that shows results from a database query. In the same page, I have a form that adds a row to the database as well as displays the row at the end of table. I used jQuery ajax to insert the record to the database and if it’s successful then I created a <tr> <td> ... </td> </tr> element and appended this element to the table using jQuery. This works fine. Now I want to make the table rows clickable. I tried it using
$('#table-name tr').click(function () {
alert ("hello");
});

Click function doesn’t work for the rows that I added using the form. Is there any workaround? How can I make all rows clickable?

  • 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-14T11:07:09+00:00Added an answer on June 14, 2026 at 11:07 am

    $('#table-name tr') returns only the <tr> elements that exist when you call that selector. If you add new rows dynamically, they won’t be accounted for.

    jQuery has special syntax to take care of dynamically generated elements:

    $('#table-name').on('click', 'tr', function() {
        alert('Hello');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple asp.net web page that contain a table with about 5
I have a web page that has an HTML table generated by an ASP.NET
I have a ASP.NET web page that contains many textboxes. Each textbox has a
I have to do a asp.net web page that when load will say something
I have created a web page (ASP.NET) that includes a stylesheet to mimic Dynamics
I have an ambitious requirement for an asp.net 2.0 web page that contains a
Let's say I have an ASP.NET web application. I create an aspx page that
I have an ASP.NET web app that uses a single page, but makes some
I 'm new to the asp.net. I have created one web page in that
I have written an ASP.NET web page with C# behind that runs an existing

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.