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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:27:23+00:00 2026-06-04T02:27:23+00:00

Ignore my novice knowledge in jQuery. I started to learn recently and I have

  • 0

Ignore my novice knowledge in jQuery. I started to learn recently and I have a challenge in front of me. I have a checkbox with names checkbox_0, checkbox_1 and want to remove "checkbox_" from the strings so that I would use the 0, 1 in my loop to extract the data for that index. Thanks

aData value alerts me the value checkbox_0, checkbox_1 etc. those are the checkboxes selected.

submitButton.on("click", function() {
           $("Table :checked").each(function(e) {
                var iData =Table.fnGetData( this.parentNode);
                // Strip of the checkbox_ from the string
                for(var i=0; i<=iData.length; i++) {
                  aData = iData[i][7];
                }
                alert(aData);
                Table.fnDraw();             
                 
            });
        });
  • 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-04T02:27:24+00:00Added an answer on June 4, 2026 at 2:27 am

    This is just a JavaScript, not a jQuery, thing.

    To remove the first occurence of the work “checkbox_”:

    var updatedString = originalString.replace("checkbox_", "");
    

    Or if you know it’ll always be in the form "checkbox_n" where n is a digit,

    var updatedString = originalString.substring(9);
    

    …which chops the first nine characters off the string.

    In either case, you end up with a string. If you want a number, you can use parseInt:

    var updatedString = parseInt(originalString.replace("checkbox_", ""), 10);
    // or
    var updatedString = parseInt(originalString.substring(9), 10);
    

    …or just put a + in front of it to cause an automatic cast (but note that in that case, both decimal and hex strings will be handled):

    var updatedString = +originalString.replace("checkbox_", "");
    // or
    var updatedString = +originalString.substring(9);
    

    Note that I’ve written updatedString = originalString.blah(...); but of course you can replace your reference, e.g., “originalString = originalString.blah(…);`.

    More to explore:

    • MDN page on String
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to ignore the hidden OS X Icon\r file in ido-find-file : $
How can I ignore missing columns on iBatis resultMap? If I have this mapper
I want to ignore some of my files (/config/environments/production.rb , /webrat.log , /config/database.yml ).
I am trying to ignore the enter key, but i do not want to
I want to ignore all the UserWarning in my dev environment so that they
The Situation (Ignore this it is boring): I have reports that I created using
I want to find all possible paths in a directed cyclic graph. I have
Fairly novice when it comes to jQuery, so thanks in advance for bearing with
I need to ignore routes matching this schema /{controller}/edit/undefined {controller} - could be any
The following ignore new lines when I display them private void post() { String

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.