You really don't need to refrence them by name.
function selectAll(formObj)
{
for (var i=0;i < formObj.length;i++)
{
fldObj = formObj.elements[i];
if (fldObj.type == 'checkbox')
{
fldObj.checked = true;
}
}
}
You'd have to use an if/then if you want to check/uncheck them all.
_____________________________
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com
-----Original Message-----
From: Brunt, Michael [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 1:55 PM
To: CF-Talk
Subject: Checkbox with mutliple names passed to query needing 1 name
I have the following issue. I had to create a form which is populated
from
a query which can return multiple rows, one of the form elements is a
Checkbox which is used to select a row or rows from the form to run a
succeeding select query. Our users needed to capability to select or
deselect all check boxes at once and with help from CF-Talk we solved
this
issue using JavaScript and cfloop. The snag is that in a multiple line
form
each checkbox now has a unique value as a result of this code: -
<td><input type="Checkbox" name="C#loopCount#"
value="#SVC_ADDR_ID#"></td>
The C#loopCount# means that each checkbox has a different name when it
passed to the next query and the query obviously needs a fixed checkbox
name
to interpret the form.checkbox var passed to it. It's Catch22!
Anyone got any ideas on this? and I hope I described this clearly.
Mike Brunt
Sempra Energy
213.244.5226
"A complex system that does not work is invariably found to have evolved
from a simpler system that worked just fine. "
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists