How to select all check boxes in web

Hi All

I have created check boxes using this code in view first column and calling view in $$view body — CODE


“[<input type=‘checkbox’ name=‘$$SelectDoc’ value='”+@Text(@DocumentUniqueID)+“’ onclick=if(this.status==true){document.forms[0].elements('hdchk”+@Text(@DocNumber)+“').value=this.value;}else{document.forms[0].elements('hdchk”+@Text(@DocNumber)+“‘).value=’';}> ]”


  1. now i have to select all check boxes.

  2. i have to get the document unique id of selected row or check box.

Regards

Sanjay

Subject: RE: how to select all check boxes in web

Domino can generate these checkboxes for you automatically – there’s a view property that does this.

But I don’t see what that extra hidden field is for.

To check all the boxes, you could do something like this:

var checks = document.forms[0].fieldname;

for (var i = 0; i < checks.length; i++)

checks[i].checked=true;

To tell what’s checked, test the checked property and then if it is checked, use the value property to find out which document.