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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:22:23+00:00 2026-05-24T01:22:23+00:00

I have a CheckBoxList that displays a list of checkboxes using data from a

  • 0

I have a CheckBoxList that displays a list of checkboxes using data from a table.

While the records in this table is expected to change, the last item is expected to have a text value of Other with an expected value.

If the user selects “Other”, I want to be able to enable an associated text box where they enter a specified “Other” description. I want to be able to do this on the client using Javascript or jQuery.

Since the IDs individual list items are dynamically created is there a way that I can avoid hard coding something like:

chkOther = document.getElementbyID(“checkListItem12_chkOccupationOther”)

I don’t know jQuery, but I figure that that Library probably provides a nice way to get control using a matching ID mask, for example.

Suggestions?

  • 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-24T01:22:25+00:00Added an answer on May 24, 2026 at 1:22 am

    If you can guarantee that your “Other” Check box is always last you can use the last selector.
    Using the ID of the check box list:

    $(document).ready(function() {
        $("#<%=YourCheckBoxList.ClientID%> input:checkbox:last").click(function(){
           if(this.checked)  {          
              //Enable Text Box Here
           }else{
              //Disable here 
           }
        });
    });
    

    EDIT: Updated to remove the unnecessary convert of “this” to a jQuery object as per RobG’s Comment.

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

Sidebar

Related Questions

I have an ASP.NET server control that inherits from CheckBoxList that renders the controls
i have a CheckBoxList with a list of services that the user can execute...
I have a checkboxlist in C# that is databound from the database. What I
I have a CheckBoxList where users can select multiple items from the list. I
I have a CheckBoxList that is showing all A table C column. SELECT DISTINCT
I have a checkboxlist wich contains a list of services loaded from a database
I have a checkbox list that isn't updating on the looping through it. <asp:CheckBoxList
I have asp.net checkboxlist control that bounded to a data source so the number
I have a checkbox list control on my asp.net web form that I am
I have this CheckBoxList on a page: <asp:checkboxlist runat=server id=Locations datasourceid=LocationsDatasource datatextfield=CountryName datavaluefield=CountryCode />

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.