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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:32:48+00:00 2026-06-13T05:32:48+00:00

I am displaying data in a table and in the table i have a

  • 0

I am displaying data in a table and in the table i have a link. If user clicks that link, my target is to open a jquery dialog which will contain a form to submit.

The problem is, from the 2nd row to downwards if I click on the link, it says ‘jquery is undefined’, it does not find the jquery.
BUT, on the first row, if I click the link, It works fine.

code:

<script>
var linkObj;
$(function () {

    $('#ratingpopup').dialog({
        autoOpen: false,
        width: 450,
        resizable: false,
        modal: true,
        buttons: {
            "Send": function () {
                $("#edit-message").html(''); //make sure there is nothing on the message before we continue                         

                $("#updateRatingForm").submit();
            },
            "Cancel": function () {
                $(this).dialog("close");
            }
        },
        title:"Rating/Comment"
    });
    $("#rating").click(function () {
        linkObj = $(this);
        var dialogDiv = $('#ratingpopup');
        var viewUrl = linkObj.attr('href');
        $.get(viewUrl, function (data) {
            dialogDiv.html(data);

            var $form = $("#updateRatingForm");

            $form.unbind();

            dialogDiv.dialog('open');
        });
        return false;
    });

});
</script>

<div class="dataTable">
<table>

    <tr>
        <td>Ordernr.</td>
        <td>Dato</td>
        <td>Restaurant</td>
        <td>Address</td>
        <td>Delivery?</td>
        <td>Accepted?</td>
        <td colspan="3">Action</td>
    </tr>

    <%foreach (var i in Model)
  { %>
    <tr>
        <td><%:i.OrderNo %></td>
        <td>
        <%
        DateTime today = DateTime.Now;
        DateTime orderDate = Convert.ToDateTime(i.OrderDate);
        if (today.Date == orderDate.Date)
        {%>
        <b> i dag</b>
        <%}
        else
        { %>
        <%:i.OrderDate%>
        <%} %></td>
        <td><%:i.RestaurantInfo.Name %></td>
        <td><%:i.RestaurantInfo.Address %>, <%:i.RestaurantInfo.Postcode %></td>
        <td><%:i.IsForDelivery %></td>
        <td><%:i.IsAccepted %></td>

        <td><a href='<%:Url.Action("Add", "Rating", new { name = i.RestaurantInfo.Name     }) %>' id="rating">Rating</a></td> // this is the link
    </tr>
  <%} %>

</table>

</div>
<div id="ratingpopup"></div>

This is kind of weird to me…Anyone knows about this behavior??

  • 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-13T05:32:49+00:00Added an answer on June 13, 2026 at 5:32 am

    You are duplicating the ID on every row, use a class instead – it is only using the first row ID by default as by definition ID is unique on the page. ( or supposed to be since the 1999 specification for html)

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

Sidebar

Related Questions

I have a table in a jsp in which i am displaying data from
I have table view in that click any i am displaying data in overlay
I have a JSF data table that is displaying data based off a search
I'm working on this JSF table which is used for displaying data. When I
I have a WCF web-service and a Silverlight app displaying data from that service.
I have a custom Drupal module displaying some data in a table. Each row
I have a table displaying tabular data in the form of a report. I
I have two table views displaying the data from a Sqlite database. I can
In my report viewer i have a table displaying data in different columns. I
I have table displaying some data from a table in a ctp file. I

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.