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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:29:39+00:00 2026-06-06T18:29:39+00:00

When a user clicks a table row, I use jQuery to select the link

  • 0

When a user clicks a table row, I use jQuery to select the link in one of the cells. This is fairly standard, from my searches.

$(document).ready(function () {
    $('table.timecarddetail tr').click(function () {
            var href = $(this).find("a").attr("href");
            if (href) {
                window.location = href;
            }
        });
    });  

Note: table.timecarddetail is the table class.

The embedded link is essentially an ajax call and so it does not do a full post back and the page doesn’t refresh. My problem is that the event fires once, but subsequent clicks are ignored.

The technical details: I’m using VS2010, and each link points to the same procedure passing in a record ID. A modal popup extender panel is populated with data from that record and then is displayed with panel.show.

What am I doing wrong 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-06-06T18:29:40+00:00Added an answer on June 6, 2026 at 6:29 pm

    I’ve had the same problem whilst implementing JQueryUI in the past. The script manager destroys the javascript after an ajax post back. you can get around this by wrapping it in a function and calling it back on the beginning and the end of your ajax call

    Jquery

    $(document).ready(function () { 
        setRows();
    });   
    
    function setRows() {
    $('table.timecarddetail tr').click(function () { 
            var href = $(this).find("a").attr("href"); 
            if (href) { 
                window.location = href; 
            } 
        }); 
    }
    

    Then in your page put this after your script manager

    <asp:ScriptManager runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_beginRequest(BeginRequestHandler);
        prm.add_endRequest(EndRequestHandler);
        function BeginRequestHandler(sender, args) {
            setRows();
        }
        function EndRequestHandler(sender, args) {
            setRows();
        }
    </script>
    

    Hope this helps.

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

Sidebar

Related Questions

I have two table views, when user clicks one cell of the first, second
I have a table and when the user clicks on a row it's highlighted
I have a table cell, and when the user clicks on it, I replace
When user clicks on select box , I want to hide the options menu
When the user clicks on a button, a new ListFragment is displayed. This fragment
If a user clicks the blank row at the bottom of a DataGridView and
When the user clicks add more options, a from is created with javascript document.getElementById('addmore').innerHTML
I am trying to use Table Views and navigation controllers. This is the code
In my app i making use of uitable to select category from my list.
I am trying to use a label from another row in the gridview and

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.