Check all checkboxes (javascript) incompatable wit

Results 1 to 2 of 2

Thread: Check all checkboxes (javascript) incompatable wit

  1. #1
    Join Date
    Dec 1969

    Default Check all checkboxes (javascript) incompatable wit

    On a certain form, when the user clicks the [CHECK ALL] button, all the checkboxes are checked. Cool. But all the checkboxes have to have the same name ie: <BR>&#060;input type="checkbox" name="list" value="id_&#060;%= ticketSet("id") %&#062; &#062;<BR><BR>Is there a javascript that will allow me to check all checkboxes even if they have different names? I ask because to run this little asp diddy, I need each to have a different name:<BR><BR>&#060;%<BR>for each x in request.form<BR> &#039;do something such as delete each checked.<BR>next<BR>%&#062;<BR><BR>Perhaps there is an asp that will do this. What does that x mean anyway? What would happen if I said &#060;% for each y in request form %&#062; ????<BR><BR>If you have a working example of checking all checkboxes on a page (javascript) and an asp that can work with the submitted data, please provide it!<BR><BR>Thanks!<BR><BR>Edward

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Check all checkboxes (javascript) incompatable

    try this<BR><BR>function CheckAllFields(frm){<BR>for ( i = 0; i &#060; frm.elements.length; i++){<BR>if(frm.elements[i].type == "checkbox"){<BR>frm.elements[i].checked == true;<BR>}<BR>}<BR>}<BR><BR><BR>ill let you figure WHAT you have to pass to this function.<BR><BR>

Posting Permissions

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