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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:41:54+00:00 2026-05-29T10:41:54+00:00

Here is HTML markup of 2 rows from my huge table (which generated by

  • 0

Here is HTML markup of 2 rows from my huge table (which generated by PHP and applied Datatables after that)

<tr url="?page=item&id=850">

    <td class="item_id"><input type="checkbox" name="checkbox[]" method="post" value="850" class="checkbox"/>    850</td>

    <td> 9007</td>

    <td style="text-align:center">BK</td>

    <td style="text-align:center">41</td>

    <td style="text-align:center" id="qt">1</td>

    <td style="text-align:center">7</td>

    <td style="text-align:center">11</td>

    <td>09.02.2012</td>

</tr>

And here is second row

<tr url="?page=item&id=587">

   <td class="item_id"><input type="checkbox" name="checkbox[]" method="post" value="587" class="checkbox"/>    587</td>

   <td> 779-59</td>

   <td style="text-align:center">BR</td>

   <td style="text-align:center">37</td>

   <td style="text-align:center" id="qt">2</td>

   <td style="text-align:center">15</td>

   <td style="text-align:center">14</td>

   <td>08.02.2012</td>

</tr>

Function below works for 90% rows. I really have no idea why this script works for second row from examples but doesn’t do anything for first row. These 2 rows are nearly same.

$("td").not('.item_id').click(function(){
    window.open ($(this).closest("tr").attr("url"));
});

How do you think, what can cause this problem?

  • 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-29T10:41:55+00:00Added an answer on May 29, 2026 at 10:41 am

    Instead use this which will attach click handler on tr and ignore if clicked on checkbox or its containing cell. Try this.

    $("tr").click(function(){
        window.open($(this).attr("url"));
    });
    
    $("td.item_id").click(function(e){
        e.stopPropagation();
    });
    

    Alertnatively you can also use event.target to check if it is checkbox don’t do any this.

    $("tr").click(function(e){
        if(!$(e.target).is(':checkbox') && !$(e.target).is('.item_id')){
            window.open($(this).attr("url"));
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to edit data in a table using jQuery. The HTML markup is:
I decided to write my own markup for a table that has a static
I have a CMS with a form-module, which generates an awful markup, that makes
Designing a simple HTML table that I am going to implement alternate-row coloring on...
I have the following HTML markup : <a class=link1 href=javascript:load(0,1);>Click here</a><span class=loader></span> The load
i'm stuck with an annoying problem - dunno what's wrong here. my html markup:
Here is a HTML markup <tr><td><b>Effective Date</b></td><td colspan=2><input class=datepicker value=01/04/2011 ></td></tr> (Unfortunately I have
Here's a simple example to illustrate the behavior: Given this html markup: <div data-company=Microsoft></div>
I have some Sharepoint-produced HTML markup which is not the best you've seen, and
I have a bunch of HTML markup coming from an external source, and it

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.