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

  • Home
  • SEARCH
  • 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 796007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:34:22+00:00 2026-05-14T22:34:22+00:00

I have an ASP.net MVC2 application. In wich I’m using JQuery to alter all

  • 0

I have an ASP.net MVC2 application. In wich I’m using JQuery to alter all table rows so I can click anywhere in any row to trigger a click event on a link in the clicked row.

The tables is created using MVC’s built in partialview ajax.

Here is my JQuery script.

<script type="text/javascript">

        $(document).ready(function () {
            $('table tr').live('click',function (event) {
                $('#asplink', this).trigger('click');
            })
            .live('mouseenter',function (event) {
                this.bgColor = 'lightblue';                    
            })
            .live('mouseleave', function (event) {
                this.bgColor = 'white';
            });

        });

</script>

And this is the first part of the partial view code that creates the table.

<% foreach (var item in Model.JobHeaderData)
   { %>

    <tr>
        <td>
            <a id="asplink" href="http://localhost/sagstyring/EditJob.asp?JobDataID=<%: item.JobDataId %>&JobNumId=<%: item.JobNumID%>&JobNum=<%: item.JobNumID%>&DepId=1&User_Id=<%:ViewData["UserId"]%>" onclick="window.open(this.href,'Rediger sag <%: item.JobNumID %> ', 'status=0, toolbar=0, location=0, menubar=0, directories=0, resizeable=0, scrollbars=0, width=900, height=700'); return false;">Rediger</a>                 
        </td>

In firefox this works perfectly. In IE, JQuery crashes when I click on a row.

If I debug the page in IE. I get this.

Out of stack space

In jquery-1.4.1.js line 1822

 // Trigger the event, it is assumed that "handle" is a function
    var handle = jQuery.data( elem, "handle" );
    if ( handle ) {
        handle.apply( elem, data );
    }

I’m no eagle at javascript, so I’m pretty much stuck.

Edit: IE had a problem with spaces in my window.open function on the click event. Having fixed that, I can now see that the click event is actualy working, but it enters a Loop. I just keeps clicking on the link until I get the Out of stack space error.

Any thoughts on this?

  • 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-14T22:34:23+00:00Added an answer on May 14, 2026 at 10:34 pm

    Found a solution.

    This works.

    $('table tr').live('click', function (event) {                    
                    window.open(jQuery(this).find(".asplink").attr('href'), 'Edit', 'status=0, toolbar=0, location=0, menubar=0, width=900, height=700');                               
                })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.