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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:42:53+00:00 2026-05-26T11:42:53+00:00

I have 1 checkbox that when checked or unchecked will check or uncheck a

  • 0

I have 1 checkbox that when checked or unchecked will check or uncheck a specific number of other checkboxes. I have it for 3 simple checkboxes but I keep getting ‘THIS’ is undefined. I’m testing in firefox 7 and ie 8. Here is the html code:

<SCRIPT LANGUAGE="JavaScript">
function check(field, varstring, caller)
{
   var arrvars = varstring.split(" ");
   if (caller == "Check All")
   {
      for (i = 0; i < field.length; i++)
      {
        for(j=0; j<arrvars.length; j++)
        {
            if(field[i].value==arrvars[j])
            field[i].checked = true;
        }
      }
      return "Uncheck All";
   }
   else
   {
      for (i = 0; i < field.length; i++)
      {
        for(j=0; j<arrvars.length; j++)
        {
            if(field[i].value==arrvars[j])
            field[i].checked = false;
        }
      }
      return "Check All";
    }
}

</script>

<form>

<INPUT STYLE="WIDTH: 13PX; HEIGHT: 13PX; VERTICAL-ALIGN: MIDDLE;" RUNAT="SERVER" TYPE="CHECKBOX" ID="CKALL2" NAME="CKALL2" TITLE="CHECK ALL" ONCLICK ='THIS.TITLE=CHECK(THIS.FORM.V_I, "X718 X1384 X2096", THIS.TITLE)' />
<br /><br />

<INPUT RUNAT="SERVER" TYPE=CHECKBOX DISABLED TITLE="1920" />
<INPUT RUNAT="SERVER" TYPE="CHECKBOX" ID="V_I" NAME="V_I" VALUE="X718" TITLE="1921" />
<INPUT RUNAT="SERVER" TYPE="CHECKBOX" ID="V_I" NAME="V_I" VALUE="X1384" TITLE="1922" />
<INPUT RUNAT="SERVER" TYPE="CHECKBOX" ID="V_I" NAME="V_I" VALUE="X2096" TITLE="1923" />
</form>
  • 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-26T11:42:53+00:00Added an answer on May 26, 2026 at 11:42 am

    JavaScript variables and keywords are case-sensitive.

    Use this.title=check(...) instead of THIS.TITLE=CHECK(...).

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

Sidebar

Related Questions

I have a CheckBox that, when checked/unchecked will toggle the Enabled property of some
I have a PrimeFaces checkbox on a JSF page that I'd like to check/uncheck
I have made a function that if i check a checkbox an text will
I have used checkbox column in gridview. I want to check status of that
i have disabled all the checkboxes except one. On click of that checkbox i
I am writing a Autohotkey script that need to 'check' and 'uncheck' checkboxes defined
The purpose is to have a checkbox, that if clicked, will send via post
I have a listbox of checkboxes that I want to iterate through and check
I have a WPF ListView that contains CheckBox column and other columns of the
I want read-only check boxes to be greyed out, but display their checked/unchecked status

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.