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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:31:54+00:00 2026-06-13T06:31:54+00:00

I have a list with checkboxes on a page. Whenever an item is selected

  • 0

I have a list with checkboxes on a page. Whenever an item is selected it should be compared with a CSV string, stored in a hidden input field. The string looks likes 13,14,19`.

I need to show an alert box if the value of the selected checkbox matches with any of value that exists in my CSV string.

My js function is

  $(document).ready(function () {
            $('#<%=chkboxListReportReq.ClientID %>').click(function () {
                $('#<%=chkboxListReportReq.ClientID %> input:checked').each(function () {
                    alert($(this).closest('span').attr('data-value'));
                    //alert($(this).next('label').text());
                });
            });
        });

This is what I’ve tried so far…

  • 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-13T06:31:56+00:00Added an answer on June 13, 2026 at 6:31 am

    HTML is not necessary for this question, I’m just searching for
    comparing a CSV with a string only..

    Based on your last comment there exsist more than one way. The best way is to using search(). Although is comes from plain Javascript, you can use it with strings stored in jquery variables.

    To search() itself:

    This method uses the Regular Expression object, as you can see like follows:

    var myCsvfileString = "13,14,15,19";
    var found = myCsvfileString.search(<place here your reg expression>);
    
    if (found > -1) {alert("Something has been found);}
    

    For an overview about the syntax of regular expressions you should look up at the Internet or here. I’m defnetly not an expert for req expr. The following link gives you some information, though I think there exists better ones.

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

Sidebar

Related Questions

I have a list of checkboxes. If the page is refreshed before the user
I have a page where I list checkboxes named TimeRange1, TimeRange2.... TimeRange7, and I
I have list of checkboxes that has all checkbox pre-checked when page load. Firstly,
I have a list of checkboxes on a page, however, their values are not
We have an ASP.Net page that uses a checkbox to toggle between a list
I have a list of Checkboxes & I want to get the status of
I have a list of checkboxes like you would see in most email clients
I have a list of checkboxes in a table like this along with a
I have this long list of checkboxes with specific labels that look something like
I have this long list of checkboxes with specific labels that look something like

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.