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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:08:28+00:00 2026-05-27T03:08:28+00:00

The problem I have is this; I am using an editor template as follows;

  • 0

The problem I have is this;
I am using an editor template as follows;

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SHP.WebUI.Models.OtherTeam>" %>

<fieldset>
    <legend><%:Model.Approver.GetName() %> team.</legend>
    <table class="groupBorder">
    <tr>
        <th align="right">Name</th>
        <th><div>Entitlement</div><div>THIS Year</div></th>
        <th><div>Days Left</div><div> THIS Year</div></th>
        <th><div>Leave</div><div>Taken</div></th>
        <th><div>Future</div><div>Booked</div><div>Leave</div></th>
        <th><div>Days Left</div><div> NEXT Year</div></th>
        <th align="center"><div style="padding-bottom:5px;">Select</div><div style="padding-left:11px;">
        <input type="checkbox" id="OtherSelectAll" /></div></th>
    </tr>
    <tbody  id="OtherSelectContainer">
    <%: Html.EditorFor(model => model.TeamMembers) %>
    </tbody>
    <tr>
        <td colspan="2" align="right">Date From</td>
        <td colspan="6"><%: Html.EditorFor(model => model.CalendarVM.Dates.DateFrom) %></td>
    </tr>
    <tr>
        <td colspan="2" align="right">Date To</td>
        <td colspan="6"><%: Html.EditorFor(model => model.CalendarVM.Dates.DateTo)%>OR last holiday date <%: Html.EditorFor(model => model.CalendarVM.Dates.LastHolidayDateFlag)%></td>
    </tr>
    <tr>
        <td colspan="2"></td>
        <td colspan="6" align="left"><input type="submit" value="Submit" id="btnSubmit"/></td>
    </tr>
</table>
</fieldset>
<script language="javascript" type="text/javascript">
    $('#OtherSelectAll').change(function () {
        if ($(this).is(':checked')) {
            $('#OtherSelectContainer').find('input:checkbox').attr('checked', true);
        }
        else {
            $('#OtherSelectContainer').find('input:checkbox').removeAttr('checked');
        }
    }); 
</script>

The first time it is output it works fine. However the IDs clash after that, so the Select All checkbox no longer works.
I need the ID of the tbody element to be unique, and at the same time the jquery that implements the Select All functionality needs to know what the ID is.
So how do I do that?

  • 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-27T03:08:29+00:00Added an answer on May 27, 2026 at 3:08 am

    Use CSS class names instead for your jQuery operations.

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

Sidebar

Related Questions

I have a problem - i can't compile SqlCipher. I'm using this http://groups.google.com/group/sqlcipher/browse_thread/thread/55c6296b56bf4533/c792bbec6df7d4f4?tvc=2#c792bbec6df7d4f4 instructions
I enjoy developing algorithms using the STL, however, I have this recurring problem where
i have a problem using the Catch Clipboard Events code found on this link
I have a problem when trying to execute this update statement (below) using C#
I have basically the same problem outlined in this question, however I am using
My problem is this one, I am using Sharepoint 2010, I have a form
I have problem with this piece of code: var el = $('div#editor'); el.find('*[contentEditable]').removeAttr('contentEditable'); It
I'm using Telerik's Grid control from the MVC Extensions. I have it set up
I have this problem I'm hoping someone knows the answer to. I have an
I have this problem where I open Visual Studio and the internal windows are

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.