[Javascript] intermediate state of a checkbox

Dan Costea costea.dan at ssi-schaefer.ro
Thu Oct 2 08:50:24 CDT 2003


yes, this is what I was looking for.

Thank you!
  ----- Original Message ----- 
  From: Mckinney, Lori K 
  To: [JavaScript List] 
  Sent: Thursday, October 02, 2003 4:49 PM
  Subject: RE: [Javascript] intermediate state of a checkbox


  IE has it

  http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/indeterminate.asp

  I've used it in our (IE 5+ only) application.  Our application of it looks similar to the checked tree view in VB.Net.  There is a category that has a checkbox and under it are values that each have a check.  If you check the category, all of the values get checked.  If you check a value and it turns out that you have now checked all of the values, the category gets checked. If some of the values are checked and some are not, the checkbox is set indeterminate.  So the category check box is not checked and neither are any of the values, they are all checked or some of the values are checked and the category is checked indeterminate.  Here is a little snippet.

   // went through all of the child checks and they all match compareState (true or false) so set the parent check to match compareState
   if ( ! allChildChecksMatch )
   {
    topCheck.indeterminate = false;
    topCheck.checked = compareState;
   }
   else
   {
    topCheck.indeterminate = true;
   }

    -----Original Message-----
    From: Dan Costea [mailto:costea.dan at ssi-schaefer.ro]
    Sent: Thursday, October 02, 2003 1:22 AM
    To: javascript at LaTech.edu
    Subject: [Javascript] intermediate state of a checkbox


        Hi to all!

    How can I set from JavaScript the intermediate state of a checkbox? (see pic. from attachment to see what I mean with "intermediate state")

    Thank you,
    Dan Costea.


------------------------------------------------------------------------------


  _______________________________________________
  Javascript mailing list
  Javascript at LaTech.edu
  https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20031002/b53420f4/attachment.htm>


More information about the Javascript mailing list