select ALL the checkboxes

Results 1 to 2 of 2

Thread: select ALL the checkboxes

  1. #1
    Join Date
    Dec 1969

    Default select ALL the checkboxes

    I have an ASP form that generates a checkbox next to every record returned from a query.<BR><BR>I&#039m hoping someone can help me with the couple of lines of code I need so that my user&#039s can press one button, and select all the checkboxes.<BR><BR>Thanks

  2. #2
    Vikas Nigam Guest

    Default RE: select ALL the checkboxes

    Hi try this:<BR>Place a button on form<BR>&#060;input type=button name=x value ="select all" Onclick=FuncCheck()&#062;<BR><BR>&#060;script language="javascript"&#062;<BR>FuncCheck()<BR>{<BR >//loop in names of all check boxes (chk1,chk2....chk10)<BR> for (i=1; 1&#060;=10; i++)<BR>{<BR>document.forms[0].chk(i).checked=true;<BR>}<BR><BR>}<BR><BR>&#060;/script&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts