Thanks for the replies. I'm UK time so sorry I didn't reply earlier. Thanks for the ideas, I think Chris' idea is the closest to what I need to do.

Cheers

Stephen

On 3/14/06, Chris Stoner <[EMAIL PROTECTED]> wrote:
The way I handle this is with either a cfparam or if its in a method with cfargument defaults:

For non method/functions:

<cfparam name="form.checkbox1" default="false" type="boolean" />
<cfparam name="form.checkbox2" default="false" type="boolean" />
<cfparam name="form.checkbox3" default="false" type="boolean" />
<cfparam name=" form.checkbox4" default="false" type="boolean" />
<cfparam name="form.checkbox5" default="false" type="boolean" />

for use inside a method:
<cfargument name="arg1" type="boolean" default="false" />
<cfargument name="arg2" type="boolean" default="false" />
<cfargument name="arg3" type="boolean" default="false" />
<cfargument name="arg4" type="boolean" default="false" />
<cfargument name="arg5" type="boolean" default="false" />

So if the checkbox isn't checked the value gets defaulted to false.  You can then set the session.checkbox1's value accordingly (either true or false) or you can loop over and delete the false checkboxes that were set to false using structDelete( session, "checkbox1'"). 

-- Chris Stoner



On 3/14/06, Stephen Adams < [EMAIL PROTECTED]> wrote:
Hi,

In the application I'm writing the user can page through a resultset. I have stored the results set in a session variables so that it is available when the page reloads (displaying the next page). As the user goes through these pages they can check a number of checkboxes as they go. The value for these check boxes are added to a structure again stored in the session scope so its available after the page reloads.

The problem I'm having is if the user goes back a page and unchecks some checkboxes then goes forward to the next page how can I remove from the session structure the uncheck values.

I do have one idea, every time the page is loaded I can compare the existing structures values against what has been passed by the submitted form and removing the values that are in the session structure that are not in form, but I'm not sure this will work as I hope.

Has anyone else done something like this?

Stephen
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to