Jump to content
  • 0

Select all chack boxes


BCGrec4rec

Question

Hi everyone, I have a very large datapage and included within it are 35 industry options which are individual check boxes. I have used this method as it is easier to read than a list box. However for ease of use i am looking at ading a "select all" function that with one click, checks all the check boxes.

Does anyone have any clues for me on this?

Thanks

Steve :)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hello,

You can have this java script in the header:

checked=false;

function checkedAll (caspioform) {

var aa= document.getElementById('caspioform');

if (checked == false)

{

checked = true

}

else

{

checked = false

}

for (var i =0; i

{

aa.elements.checked = checked;

}

}

Then add an HTML block create a button to check all check boxes or deselect them all in it:

For your information these question is related to Caspio bridge so please post your questions to Caspio bridge rather than ExpressDB which is another product we provide to our clients.

Hope it helps.

Kamalan

Link to comment
Share on other sites

  • 0

Hi,

Hope below java scripts will help;

//==========================================

// Check all or uncheck all?

//==========================================

function CheckCheckAll(fmobj) {

  var TotalBoxes = 0;

  var TotalOn = 0;

  for (var i=0;i<fmobj.elements.length;i++) {

    var e = fmobj.elements[i];

    if ((e.name != 'allbox') && (e.type=='checkbox')) {

      TotalBoxes++;

      if (e.checked) {

       TotalOn++;

      }

    }

  }

  if (TotalBoxes==TotalOn) {

    fmobj.allbox.checked=true;

  }

  else {

   fmobj.allbox.checked=false;

  }

}
Scripts on how to install comment boxes in blogger
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...