Another crazy idea for you... How about having CF generate comma separated lists of the element numbers of the checkboxes, and then loop through those lists in Javascript?
Wednesday, April 14, 2004, 9:58:28 AM, you wrote: BB> 'fraid not BB> they already have their own index naming system that the form processing BB> logic depends on. that's why the ID stuff. BB> b BB> -----Original Message----- BB> From: KNOTT, Brian [mailto:[EMAIL PROTECTED] BB> Sent: Wednesday, 14 April 2004 9:51 AM BB> To: CFAussie Mailing List BB> Subject: [cfaussie] Re: (OT) access groups of chkboxes using ID, not n BB> ame BB> How are you generating the field names. maybe you can name them BB> according BB> to there group and then use javascript to search for the group name in BB> the BB> name field. i.e. call fields names like menu-1, menu-2, BB> menu-3,users-1,users-2,etc.. BB> Brian >> -----Original Message----- >> From: Barry Beattie [SMTP:[EMAIL PROTECTED] >> Sent: Wednesday, 14 April 2004 9:40 >> To: CFAussie Mailing List >> Subject: [cfaussie] Re: (OT) access groups of chkboxes using ID, BB> not >> n ame >> >> >> Are you trying to check all checkboxes in the same group. >> >> aye. >> >> the hundred or so are broken up into about 20 groups, depending on a >> particular "code group" they belong to which is what I'm setting the BB> ID >> to since I can't change the names. >> >> it's this grouping I need to access to turn them on and off. >> >> >> cheers >> barry.b >> >> >> >> -----Original Message----- >> From: KNOTT, Brian [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, 14 April 2004 9:32 AM >> To: CFAussie Mailing List >> Subject: [cfaussie] Re: (OT) access groups of chkboxes using ID, not n >> ame >> >> Barry, >> Just trying to understand what you are trying to do. Are you >> trying >> to check all checkboxes in the same group. >> >> Brian >> >> > -----Original Message----- >> > From: Barry Beattie [SMTP:[EMAIL PROTECTED] >> > Sent: Wednesday, 14 April 2004 9:13 >> > To: CFAussie Mailing List >> > Subject: [cfaussie] Re: (OT) access groups of chkboxes using ID, >> not >> > name >> > >> > >> > >> If there is only one checkbox with the same name >> > >> > but I can't use name at all - that's the problem. >> > >> > The names of the checkboxes are used for form processing and have >> > nothing to do with the groups they need to be checked or unchecked. >> > >> > so that leaves using the ID only. The trouble is that getElementByID >> > needs unique ID's to work - that's why only the first one in each >> series >> > behaves correctly. The others just sit there. >> > >> > I'm starting to think it can't be done... >> > >> > thanx anyway >> > barry.b >> > >> > >> > -----Original Message----- >> > From: Australia1976 [mailto:[EMAIL PROTECTED] >> > Sent: Wednesday, 14 April 2004 8:53 AM >> > To: CFAussie Mailing List >> > Subject: [cfaussie] Re: (OT) access groups of chkboxes using ID, not >> > name >> > >> > If there is only one checkbox with the same name, you can use >> > cbox.checked >> > >> > If there is more than one, you use array notation: >> > >> > cbox[0].checked >> > cbox[1].checked >> > cbox[n].checked >> > >> > ----- Original Message ----- >> > From: "barry.b" <[EMAIL PROTECTED]> >> > To: "CFAussie Mailing List" <[EMAIL PROTECTED]> >> > Sent: Wednesday, April 14, 2004 1:31 AM >> > Subject: [cfaussie] (OT) access groups of chkboxes using ID, not BB> name >> > >> > >> > > hi all >> > > I've got a form with a hundred or so checkboxes. I want to set up >> > small >> > > groups of them to check/uncheck. I can't use the name (form >> > processing, >> > > diff order) so I'm trying to use the ID. >> > > >> > > the bit I'm stuck on is getting an array of checkboxes and then >> > looping >> > > thru them to check only using the ID. I can get the first one to >> work >> > but >> > > not the other ones of the same name. any ideas? >> > > >> > > thanx >> > > barry.b >> > > >> > > >> > > <script> >> > > function checkAll(id) { >> > > cbox = eval("document.getElementById(id)"); >> > > if (cbox.checked == true){ >> > > cbox.checked = false; >> > > return "Check All"; >> > > }else{ >> > > cbox.checked = true; >> > > return "Uncheck All"; >> > > } >> > > } >> > > </script> >> > > >> > > here's part of the form >> > > >> > > >> > > <td><input type=button value="Check All" >> > onClick="this.value=checkAll('view_ADM')"></td> >> > > <td><input type=button value="Check All" >> > onClick="this.value=checkAll('add_ADM')"></td> >> > > <td><input type=button value="Check All" >> > onClick="this.value=checkAll('edit_ADM')"></td> >> > > <td><input type=button value="Check All" >> > onClick="this.value=checkAll('del_ADM')"></td> >> > > </tr> >> > > <tr> >> > > <td> Menu Admin </td> >> > > <td><input type="Checkbox" name="Perm_b_40 " id="view_ADM" >> > checked></td> >> > > <td><input type="Checkbox" name="Perm_b_37 " id="add_ADM"></td> >> > > <td><input type="Checkbox" name="Perm_b_39 " id="edit_ADM"></td> >> > > <td><input type="Checkbox" name="Perm_b_38 " id="del_ADM"></td> >> > > </tr> >> > > <tr> >> > > <td> Users Admin </td> >> > > <td><input type="Checkbox" name="Perm_b_36 " id="view_ADM" >> > checked></td> >> > > <td><input type="Checkbox" name="Perm_b_33 " >> > id="add_ADM"></td><td><input >> > type="Checkbox" name="Perm_b_35 "id="edit_ADM"></td> >> > > <td><input type="Checkbox" name="Perm_b_34 " id="del_ADM"></td> >> > > </tr> >> > > <tr> >> > > <td> Utilities Admin </td> >> > > <td><input type="Checkbox" name="Perm_b_44 " id="view_ADM" >> > checked></td> >> > > <td><input type="Checkbox" name="Perm_b_41 " id="add_ADM"></td> >> > > <td><input type="Checkbox" name="Perm_b_43 " id="edit_ADM"></td> >> > > </tr> >> > > >> > > --- >> > > You are currently subscribed to cfaussie as: >> [EMAIL PROTECTED] >> > > To unsubscribe send a blank email to >> > [EMAIL PROTECTED] >> > > >> > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia >> > > http://www.mxdu.com/ + 24-25 February, 2004 >> > > >> > >> > --- >> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] >> > To unsubscribe send a blank email to >> > [EMAIL PROTECTED] >> > >> > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia >> > http://www.mxdu.com/ + 24-25 February, 2004 >> > >> > >> > --- >> > You are currently subscribed to cfaussie as: >> [EMAIL PROTECTED] >> > To unsubscribe send a blank email to >> > [EMAIL PROTECTED] >> > >> > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia >> > http://www.mxdu.com/ + 24-25 February, 2004 >> >> >> BB> ------------------------------------------------------------------------ >> ----------- >> >> The contents of this message are the views of the Author and do not >> necessarily reflect the views of SUNCORP METWAY LTD ABN 66 010 831 BB> 722. >> >> >> The content of this e-mail, including attachments is a confidential >> communication between the Suncorp Metway Group and the intended >> addressee. Any unauthorised use of the contents is expressly BB> prohibited. >> If you have received this e-mail in error please contact the sender >> immediately and then delete the message and any attachment(s). >> >> http://www.suncorp.com.au >> >> >> --- >> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] >> To unsubscribe send a blank email to >> [EMAIL PROTECTED] >> >> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia >> http://www.mxdu.com/ + 24-25 February, 2004 >> >> >> --- >> You are currently subscribed to cfaussie as: BB> [EMAIL PROTECTED] >> To unsubscribe send a blank email to >> [EMAIL PROTECTED] >> >> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia >> http://www.mxdu.com/ + 24-25 February, 2004 BB> --- BB> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] BB> To unsubscribe send a blank email to BB> [EMAIL PROTECTED] BB> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia BB> http://www.mxdu.com/ + 24-25 February, 2004 BB> --- BB> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] BB> To unsubscribe send a blank email to [EMAIL PROTECTED] BB> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia BB> http://www.mxdu.com/ + 24-25 February, 2004 ----------------------- Ryan Sabir Newgency Pty Ltd 2a Broughton St Paddington 2021 Sydney, Australia Ph (02) 9331 2133 Fax (02) 9331 5199 Mobile: 0411 512 454 http://www.newgency.com/index.cfm?referer=rysig --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
