Checkboxes and parsing out numbers

Hi All,

Well i'm struggling a bit with a reasonably simple form submission problem and was wondering if anyone had some ideas for me.

Here's the code:

<FORM NAME="StepTwoRemove" ACTION="editproc.cfm" METHOD="POST">
<TD CLASS="formtext">
      <CFOUTPUT>Remove staff from #AdminDetails.AdminPositionName#</CFOUTPUT>
      <INPUT TYPE="HIDDEN" NAME="StepTwo" VALUE="Yes">
<TD>Select the staff to remove:</TD>
<CFOUTPUT QUERY="AdminDetails" GROUP="AdminPositionID">
  <!--- find staff details for this iteration --->
  <CFQUERY NAME="GetStaffDetails" DATASOURCE="#DataSource#">
      SELECT Staffing.FirstName,
      FROM Staffing
      WHERE Staffing.StaffID = #AdminDetails.StaffID#
      <TD> &nbsp;
      <INPUT TYPE="CHECKBOX" NAME="#StaffingInAdminID#" VALUE="Yes">
      GetStaffDetails.FirstName# #GetStaffDetails.LastName#&nbsp;&nbsp;Loading <i>    #AdminDetails.LoadingInPosition#</i>
<TD><INPUT TYPE="SUBMIT" VALUE="Remove Staff Member(s)"></TD>

So when this loads it loads a list like the following:

CB Firstname lastname loading: 1
CB firstname lastname loading: 1

When this submits i want to then remove the staff who have been checked, meaning the StaffingInAdminID checkboxes would be defined.

The problem i'm struggling with is as it is dynamic, i don't know how to work out how to find what was returned in the FORM structure...
as this will return

maybe this would be easier if i used:
<INPUT TYPE="CHECKBOX" NAME="Staffing#StaffingInAdminID#" VALUE="Yes">
so it would return
and then just parse off the end number?

I'm not sure, maybe im missing something blatantly obvious here but i think i am getting brain freeze :o)

Thanks for your time,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

just make a checkbox like this:

<INPUT TYPE="CHECKBOX" NAME="Staffing" VALUE="#StaffingInAdminID#">

so the value is the id of the record.

In the action page there is a list called "staffing" width al ID that you have checked in the form.
(form.staffing = ''24,57,31")
If there is no variable "staffing" there are no checkbox checked.

hope this helps, let me know

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bingo Mause :-)

bradderickAuthor Commented:
Thanks Mause that worked perfectly!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.