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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:40:42+00:00 2026-05-23T21:40:42+00:00

I have a overview page that shows the data in a table. A pop-up

  • 0

I have a overview page that shows the data in a table. A pop-up opens when the user clicks on the row. But the pop-up get’s reloaded over and over again until it hangs.

The overview code:

<tbody>
    <tr>
       <td>
          <a href="/pop-up/details/1/" onClick="MyWindow=window.open('/details_screen/1/','window1','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600'); return false;">details screen for 1</a>
       </td>
    </tr>
    <tr>
       <td>
          <a href="/pop-up/details/2/" onClick="MyWindow=window.open('/details_screen/2/','window2','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600'); return false;">details screen for 2</a>
       </td>
    </tr>
</tbody>

The javascriptthat makes the rows clickable:

function make_rows_clickable(table){
    $(table).find('tbody tr').each(function() {
                $(this).hover(function(){
                    //rollover
                    $(this).addClass('hover');
                },
                function() {
                    //rolloff
                    $(this).removeClass('hover');
                }).click(function() {
                    $(this).find('a').click();
                });
    });
}

SOLUTION

As the answer comment states, the anchor click triggers the tr click event and creates the infinte loop. I solved it by removing the onClick event and adding attributes. The tr click event opens then the pop-up.

<td>
    <a href="/pop-up/details/2/"element_id="2" pop_w="800" pop_h="600">details screen for 2</a>
</td>

Js:

$(table).find('tbody tr').hover(function(){
                    //rollover
                    $(this).addClass('hover');
                },
                function() {
                    //rolloff
                    $(this).removeClass('hover');
                }).click(function(e) {
                    e.stopPropagation();
                    var anchor = $(this).find('a');

                    var el_id = $(anchor).attr('element_id');
                    var pop_w = $(anchor).attr('pop_w');
                    var pop_h = $(anchor).attr('pop_h');

                    MyWindow=window.open('/details/screen/' + el_id + '/', el_id, 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=' + pop_w + ',height=' + pop_h);
});
  • 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-23T21:40:42+00:00Added an answer on May 23, 2026 at 9:40 pm

    So there must be multiple td’s in each table rows. Therefore when you run

    $(this).find('a').click();
    

    It finds every a tag in the row (equal to the number of td’s) in the row and executes their click functions. Due to this it opens multiple popups

    Replace the code with:

    $(this).find('a:first').click();
    

    Or use:

    $(table).find('tbody tr').click(function() {
       MyWindow = window.open('/details_screen/2/', 'window2', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=800, height=600');
       return false;
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php page that creates page data from two .txt files (one
I have a overview page containing a list with some links from which multiple
Overview: I have an array of 20 byte strings that needs to be stored
I have a document that is an overview document within a folder, there are
I'm trying to build a quick overview that shows the upcoming calendar week. I
I have a Panel layout with a TreePanel in one region. A user clicks
I have 3 openFaces <o:datatable /> s in the same view page (overview.xhtml). The
I have designed a menu control in master page. But its dynamic sub menus
I have a page that lists poem titles, average scores and lists the judges
On my website's Start page I have a Search Mask where user set select

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.