RE: Checkboxes not passing variables correctly

2008-03-25 Thread Steve LaBadie
Thank you Dominic for the extra input, very helpful examples.

Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
[EMAIL PROTECTED]
http://www.esu.edu

-Original Message-
From: Dominic Watson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 25, 2008 3:53 PM
To: CF-Talk
Subject: Re: Checkboxes not passing variables correctly

>
> Is there a list of all possible delimiters value?


A delimeter could be any 'legal' character in a string. The delimeter
you
use is informed by the string you are given to break up into list items;
using different delimiters will break up your 'list' in different ways.
Here
is some code to demonstrate, just copy and past into a blank template
and
run it; then look over the output and hopefully things will become clear
for
you (if they haven't already):



Delimiter demo
 The list: #myList#

Using default delimiter (comma)

 
  #listItem#
 


Using '|'

 
  #listItem#
 


Using '|' or ','

 
  #listItem#
 


Using any vowel

 
  #listItem#
 


Using a character that isn't in the string (@)

 
  #listItem#
 




Also, if you want a delimiter of CR LF (used quite regularly to delimit
whole lines of a csv that have a line break to indicate a new row) you
can
use the Chr function:

delimiters="#Chr(13)##Chr(10)#"

HTH

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302038
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Dominic Watson
>
> Is there a list of all possible delimiters value?


A delimeter could be any 'legal' character in a string. The delimeter you
use is informed by the string you are given to break up into list items;
using different delimiters will break up your 'list' in different ways. Here
is some code to demonstrate, just copy and past into a blank template and
run it; then look over the output and hopefully things will become clear for
you (if they haven't already):



Delimiter demo
 The list: #myList#

Using default delimiter (comma)

 
  #listItem#
 


Using '|'

 
  #listItem#
 


Using '|' or ','

 
  #listItem#
 


Using any vowel

 
  #listItem#
 


Using a character that isn't in the string (@)

 
  #listItem#
 




Also, if you want a delimiter of CR LF (used quite regularly to delimit
whole lines of a csv that have a line break to indicate a new row) you can
use the Chr function:

delimiters="#Chr(13)##Chr(10)#"

HTH

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302037
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Azadi Saryev
the value attrubute of your checkboxes are different from their
labels/text? typos?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Steve LaBadie wrote:
> I have a group of 10 checkboxes where 3 have to be checked. I have a JS
> script to validate this. The issue at hand is the values are not being
> passed completely.
>
>  
>
> If you choose Robert Mckenzie the name is passed Robet Mkenzie, any
> ideas would be appreciated.
>
>  
>
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED]  
> http://www.esu.edu  
>
>  
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302025
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Checkboxes not passing variables correctly

2008-03-25 Thread Steve LaBadie
Thanks everyone for your input and wisdom. Thanks Claude for the laugh.

Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
[EMAIL PROTECTED]
http://www.esu.edu

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 25, 2008 10:30 AM
To: CF-Talk
Subject: Re: Checkboxes not passing variables correctly

 >>Is there a list of all possible delimiters value?

If you want to know more about forms and how values are passed, use

in your action template and you'll know everything a young lady should 
know before wedding ;-)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Claude Schneegans
 >>Is there a list of all possible delimiters value?

If you want to know more about forms and how values are passed, use

in your action template and you'll know everything a young lady should 
know before wedding ;-)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302017
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread morgan l
If you just want the list of names, separated by comma and space, then use:

Faculty Supervisor: #Replace(form.fac,",",", ","all")#
On Tue, Mar 25, 2008 at 9:12 AM, Steve LaBadie <[EMAIL PROTECTED]>
wrote:

> Is there a list of all possible delimiters value?
>
> If I use your suggestion there are no spaces or commas between full
> names when the information is sent. If I use delimiters="| " there is a
> comma but no space after comma.
>
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED]
> http://www.esu.edu
>
> -Original Message-
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2008 9:59 AM
> To: CF-Talk
> Subject: Re: Checkboxes not passing variables correctly
>
>  >>delimiters="crlf">
>
> You're using "crlf" as delimitior?
> No wonder c, r, l & f are lost.
> You probably meant CR LF, but these are not the delimiters used to
> separate field values, the simple comma is used.
> So just use
> Faculty Supervisor: #f#
>
> or more simply:
> Faculty Supervisor: #form.fac#
>
> --
> ___
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
>
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302016
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Matt Williams
What is your desired output?

If you just want a straight list with commas between the chosen names,
then do as Claude said:
Faculty Supervisor: #form.fac#

If you need line breaks between the names, then do a loop as Claude
said (with a  added):

#f#



On Tue, Mar 25, 2008 at 9:12 AM, Steve LaBadie <[EMAIL PROTECTED]> wrote:
> Is there a list of all possible delimiters value?
>
>  If I use your suggestion there are no spaces or commas between full
>  names when the information is sent. If I use delimiters="| " there is a
>  comma but no space after comma.
>
>  Steve LaBadie, Web Manager
>  East Stroudsburg University
>  200 Prospect St.
>  East Stroudsburg, Pa 18301
>  570-422-3999
>  [EMAIL PROTECTED]
>  http://www.esu.edu
>
>  -Original Message-
>  From: Claude Schneegans [mailto:[EMAIL PROTECTED]
>  Sent: Tuesday, March 25, 2008 9:59 AM
>  To: CF-Talk
>  Subject: Re: Checkboxes not passing variables correctly
>
>   >>delimiters="crlf">
>
>  You're using "crlf" as delimitior?
>  No wonder c, r, l & f are lost.
>  You probably meant CR LF, but these are not the delimiters used to
>  separate field values, the simple comma is used.
>  So just use
>  Faculty Supervisor: #f#
>
>  or more simply:
>  Faculty Supervisor: #form.fac#
>
>  --
>  ___
>  REUSE CODE! Use custom tags;
>  See http://www.contentbox.com/claude/customtags/tagstore.cfm
>  (Please send any spam to this address: [EMAIL PROTECTED])
>  Thanks.
>
>
>
>
>  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302015
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Claude Schneegans
 >>Is there a list of all possible delimiters value?

There only one delimiter: the comma, which is the default delimiter for 
all list functions, so you don't need to specify one.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302014
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Checkboxes not passing variables correctly

2008-03-25 Thread Steve LaBadie
Is there a list of all possible delimiters value?

If I use your suggestion there are no spaces or commas between full
names when the information is sent. If I use delimiters="| " there is a
comma but no space after comma.

Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
[EMAIL PROTECTED]
http://www.esu.edu

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 25, 2008 9:59 AM
To: CF-Talk
Subject: Re: Checkboxes not passing variables correctly

 >>delimiters="crlf">

You're using "crlf" as delimitior?
No wonder c, r, l & f are lost.
You probably meant CR LF, but these are not the delimiters used to 
separate field values, the simple comma is used.
So just use
Faculty Supervisor: #f#

or more simply:
Faculty Supervisor: #form.fac#

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302013
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Claude Schneegans
 >>delimiters="crlf">

You're using "crlf" as delimitior?
No wonder c, r, l & f are lost.
You probably meant CR LF, but these are not the delimiters used to 
separate field values, the simple comma is used.
So just use
Faculty Supervisor: #f#

or more simply:
Faculty Supervisor: #form.fac#

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302010
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Azadi Saryev
Faculty Supervisor:  delimiters="crlf">#f#

that's your problem - your list delimiters.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Steve LaBadie wrote:
> I have a group of 10 checkboxes where 3 have to be checked. I have a JS
> script to validate this. The issue at hand is the values are not being
> passed completely.
>
>  
>
> If you choose Robert Mckenzie the name is passed Robet Mkenzie, any
> ideas would be appreciated.
>
>  
>
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED]  
> http://www.esu.edu  
>
>  
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302007
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Davide Campo
This script work correctly, try it.



#f#



 
function is_checked() { 

var formObj = document['internships']['fac']; 
var count = 0; 
for (i=0;i

Re: Checkboxes not passing variables correctly

2008-03-25 Thread Cutter (CFRelated)
No, there's nothing there that would explain it. I'd like to blame it on 
the font tags, but I can't;)

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Steve LaBadie wrote:
> This is the script to check for 3 checked boxes:
> 
> 
> function is_checked() {
> var formObj = document['internships']['fac'];
> var count = 0;
> for (i=0;i if(formObj[i].type == 'checkbox')
> if(formObj[i].checked)
> count++;
> }
> if (count < 3) {
> return false;
> }else {
> return true;
> }
> }
> function val(){
> if (!is_checked()){
> alert('You Must Choose 3 Faculty Supervisors');
> return false;
> }else {
> return true;
> }
> }
> 
> 
> 
> Faculty
> Supvisor: (Choose 3) 
>  Joseph
> Ashcroft
>  Paul
> Lippert
>  Charles
> Warner
>  Marcia
> Godich
>  /> Andrea McClanahan
>  /> Glenn Geiser-Getz
>  Robert
> McKenzie
>  Wenjie
> Yan
>  /> Patricia Kennedy
>  Cem
> Zeytinoglu
> 
> 
> Action page:
> 
> Faculty Supervisor:  delimiters="crlf">#f#
> 
> 
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED]
> http://www.esu.edu
> -Original Message-
> 
> Steve LaBadie wrote:
>> I have a group of 10 checkboxes where 3 have to be checked. I have a
> JS
>> script to validate this. The issue at hand is the values are not being
>> passed completely.
>>
>>  
>>
>> If you choose Robert Mckenzie the name is passed Robet Mkenzie, any
>> ideas would be appreciated.
>>
>>  
>>
>> Steve LaBadie, Web Manager
>> East Stroudsburg University
>> 200 Prospect St.
>> East Stroudsburg, Pa 18301
>> 570-422-3999
>> [EMAIL PROTECTED]  
>> http://www.esu.edu  
>>
>>  
>>
>>
>>
>>
> 
> 
> 
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302004
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Checkboxes not passing variables correctly

2008-03-25 Thread Steve LaBadie
This is the script to check for 3 checked boxes:


function is_checked() {
var formObj = document['internships']['fac'];
var count = 0;
for (i=0;i I have a group of 10 checkboxes where 3 have to be checked. I have a
JS
> script to validate this. The issue at hand is the values are not being
> passed completely.
> 
>  
> 
> If you choose Robert Mckenzie the name is passed Robet Mkenzie, any
> ideas would be appreciated.
> 
>  
> 
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED]  
> http://www.esu.edu  
> 
>  
> 
> 
> 
> 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301999
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not passing variables correctly

2008-03-25 Thread Cutter (CFRelated)
Steve,

We want to help, but without seeing the form code it is almost 
impossible to troubleshoot.

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Steve LaBadie wrote:
> I have a group of 10 checkboxes where 3 have to be checked. I have a JS
> script to validate this. The issue at hand is the values are not being
> passed completely.
> 
>  
> 
> If you choose Robert Mckenzie the name is passed Robet Mkenzie, any
> ideas would be appreciated.
> 
>  
> 
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED]  
> http://www.esu.edu  
> 
>  
> 
> 
> 
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301998
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Checkboxes not checking on edit form

2007-05-03 Thread Bruce Sorge
Jesus, that is the second time I did something stupid like that. Where is
captain obvious when you need him? LOL.

Thanks, and thanks for the XHTML pointer.

Bruce

On 5/3/07, Jon Clausen <[EMAIL PROTECTED]> wrote:
>
> Bruce,
>
> Looks like you have your listFind() function backwards.  I think you
> mean :
>
> Checked
>
>
> Also, FYI, in XHTML, it needs to be  'checked="checked"' since
> attributes are lowercase and all attributes must have a value . The
>  tag should be also self-closed if you're serving an XHTML
> doctype.
>
> HTH,
>
> Jon
>
>


~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276970
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Checkboxes not checking on edit form

2007-05-03 Thread Jon Clausen
Bruce,

Looks like you have your listFind() function backwards.  I think you  
mean :

Checked


Also, FYI, in XHTML, it needs to be  'checked="checked"' since  
attributes are lowercase and all attributes must have a value . The  
 tag should be also self-closed if you're serving an XHTML  
doctype.

HTH,

Jon

On May 3, 2007, at 5:02 PM, Bruce Sorge wrote:

> I have this piece of code:
>
> 
> 
> 
>
>  Array="EmailListArray"
> Transpose="Yes" AddColumnName="Yes">
> 
> 
> 
>  value="#EmailListArray[x][1]#"
> 
> Checked>
> 
> 
> 
> #EmailListArray[x][2]#
> 
> #EmailListArray[x][2]#
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
>
> This generates X number of checkboxes, and when the table is  
> queried it is
> supposed to pre-check all of the boxes that are in the table. As  
> long as
> only one box was checked when the information was input into the  
> databse it
> works fine. Where it breaks is when you have more than one item  
> checked,
> then no boxes are checked. I looked into ListGetAt as well and I  
> cannot make
> this work. When I put in ListGetAt(ValueList(EmailListArray[x][1]),  
> myList)
> I get an error that it does not like one of the brackets. So what  
> obvious
> thing am I missing here?
>
> Thanks,
>
>
>
> -- 
> Bruce Sorge
>
> "I'm a mawg: half man, half dog. I'm my own best friend!"
>
>
> 

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276969
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: checkboxes

2005-01-20 Thread Donna French
thanks to all - got it and cleared my head a little 

;-)

Donna


On Thu, 20 Jan 2005 15:45:17 -0600, Andy Ousterhout
<[EMAIL PROTECTED]> wrote:
> Remember that the Form.VarName will only be passed if checked, so in your
> action page you will need to loop through all possible names to check to see
> if the Fomr.VarName exists.
> 
> Andy
> 
> -Original Message-
> From: Donna French
> 
> what's the best method for dealing with checkboxes?
> 
> i want to insert a 1 if checked, a 0 if not.
> 
> should i set the value in my form, or check the "checked" status in my
> insert query and set the value there? i know this should be simple but
> i've stared at it so long now i've confused myself.
> 
> 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191291
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: checkboxes

2005-01-20 Thread Andy Ousterhout
Remember that the Form.VarName will only be passed if checked, so in your
action page you will need to loop through all possible names to check to see
if the Fomr.VarName exists.

Andy

-Original Message-
From: Donna French


what's the best method for dealing with checkboxes?

i want to insert a 1 if checked, a 0 if not.

should i set the value in my form, or check the "checked" status in my
insert query and set the value there? i know this should be simple but
i've stared at it so long now i've confused myself.



~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191281
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: checkboxes

2005-01-20 Thread Sandy Clark




actfile.cfm


-Original Message-
From: Donna French [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 4:36 PM
To: CF-Talk
Subject: checkboxes

what's the best method for dealing with checkboxes?

i want to insert a 1 if checked, a 0 if not.

should i set the value in my form, or check the "checked" status in my
insert query and set the value there? i know this should be simple but i've
stared at it so long now i've confused myself.

tia,
donna

--

Donna French
[EMAIL PROTECTED]

Blog: http://dgfrench.blogspot.com
Site: http://www.dgfrenchdesigns.com



~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191281
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: checkboxes

2005-01-20 Thread Mark Drew
let me read that properly
1 or 0

ok :)
 



 
 ..do something
 


On Thu, 20 Jan 2005 22:40:57 +0100, Mark Drew <[EMAIL PROTECTED]> wrote:
> In the recieveing page set up
> 
> 
> on the calling page put
> 
> 
> 
> In your query or whatever do
> 
> 
> ..do something
> 
> 
> 
> On Thu, 20 Jan 2005 15:35:53 -0600, Donna French <[EMAIL PROTECTED]> wrote:
> > what's the best method for dealing with checkboxes?
> >
> > i want to insert a 1 if checked, a 0 if not.
> >
> > should i set the value in my form, or check the "checked" status in my
> > insert query and set the value there? i know this should be simple but
> > i've stared at it so long now i've confused myself.
> >
> > tia,
> > donna
> >
> > --
> > 
> > Donna French
> > [EMAIL PROTECTED]
> >
> > Blog: http://dgfrench.blogspot.com
> > Site: http://www.dgfrenchdesigns.com
> >
> > 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191278
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: checkboxes

2005-01-20 Thread Charlie Griefer
on the form:

(etc)

on the action page:
cfparam your checkboxes with a default value of 0.

if a box is checked, it will override the 0.  if it is not checked, it
won't be passed and CF will default to the cfparam value.


On Thu, 20 Jan 2005 15:35:53 -0600, Donna French <[EMAIL PROTECTED]> wrote:
> what's the best method for dealing with checkboxes?
> 
> i want to insert a 1 if checked, a 0 if not.
> 
> should i set the value in my form, or check the "checked" status in my
> insert query and set the value there? i know this should be simple but
> i've stared at it so long now i've confused myself.
> 
> tia,
> donna
> 
> --
> 
> Donna French
> [EMAIL PROTECTED]
> 
> Blog: http://dgfrench.blogspot.com
> Site: http://www.dgfrenchdesigns.com
> 
> 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191279
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: checkboxes

2005-01-20 Thread Mark Drew
In the recieveing page set up


on the calling page put



In your query or whatever do 


..do something



On Thu, 20 Jan 2005 15:35:53 -0600, Donna French <[EMAIL PROTECTED]> wrote:
> what's the best method for dealing with checkboxes?
> 
> i want to insert a 1 if checked, a 0 if not.
> 
> should i set the value in my form, or check the "checked" status in my
> insert query and set the value there? i know this should be simple but
> i've stared at it so long now i've confused myself.
> 
> tia,
> donna
> 
> --
> 
> Donna French
> [EMAIL PROTECTED]
> 
> Blog: http://dgfrench.blogspot.com
> Site: http://www.dgfrenchdesigns.com
> 
> 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191276
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Checkboxes in CGI

2003-08-03 Thread Dave Watts
> When a form passes multiple, same-name checkboxes to a CGI 
> script (Perl, C, whatever), what is the "raw" format of 
> those form field values?

Assuming that the form was submitted via HTTP POST using the standard MIME
type (application/x-www-urlencoded), they'd be strung together like this:

myfield=value1&myfield=value2&myfield=value3...

CF, in its quest to make things as easy for us as possible, makes this into
a single variable with a comma-delimited list. But if you've enabled debug
output or reference Form.Fieldnames directly, you can see the repeated field
name in the Form.Fieldnames variable also created by CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: checkboxes to action pages

2001-09-18 Thread Koo Pai Lao

instead of having the checkbox have a value of "no", let it have a numeric 
value which could be an ID, or an increment and u can trace it back to the 
list :)








>From: Michael Vinson <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: checkboxes to action pages
>Date: Tue, 18 Sep 2001 10:33:40 -0400
>
>Hi,
>
>I have a list of records (to delete) with checkboxes. i.e. user wants to
>delete recs & clicks checkbox
>Once the user clicks submit (Delete) Here's what I know:
>- How many items in the list
>- My 'index' to the list (using email address), which contains a subset
>of the query displayed in the form. Note that the number of email
>addresses I capture is equal to the total number of items in list.
>
>Here's what do not know:
>- How to match my form checkbox name (delChecked) to my data as
>described above! The parameters that get passed to my 'action page'
>reveal (to me, at least) a compressed list showing data (e.g. on,on,on)
>but how in the world do I match this to... item 1 checked, item 3
>checked, item 5 checked
>
>Ain't learning great!
>
>Thank in advance ... -Mike
>
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: checkboxes to action pages

2001-09-18 Thread Michael Vinson

Thanks Andy, I simply indexed my checkbox value (1,2,3...) inside a cfloop &
voila' I have my number(ed) values which correspond to the checkboxes. This
technique will have to do... But I would still like to figure how to pass the
"array" of checked values (e.g. 0,0,1,1...) to my action page. Oh well, on to
the next snag :-)>

-mv

Andy Ewings wrote:

> All of your boxes should be called the same name but each should have a
> different value representing the item in question.  so for the above example
> your 3 checkboxes would all be called name but would have 3 integer values -
> 1,2,3 representing 
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: checkboxes to action pages

2001-09-18 Thread Andy Ewings

Mike

I assume the check boxes represent the same "field" in the database?  So for
example you might have three checkboxes for 3 employees called Andy, Mike
and Steve and you want to delete the employees whose box is checked?  If
this is the case then..

All of your boxes should be called the same name but each should have a
different value representing the item in question.  so for the above example
your 3 checkboxes would all be called name but would have 3 integer values -
1,2,3 representing "Andy", "Steve" and "Mike" respectively (if that was
their reoresentation within the db).  Then in the action page, if you had
checked all three the value of form.name would be "1,2,3".  Your SQL
statement would then be something DELETE * FROM employee WHERE ID IN
(#form.name#).

If your checkboxes contain text values then this becomes a bit more tricky
as the SQL statement would require single quotes around each element in the
list.

HTH
-- 
Andrew Ewings
Project Manager
Thoughtbubble Ltd 
http://www.thoughtbubble.net 
-- 
United Kingdom 
http://www.thoughtbubble.co.uk/ 
Tel: +44 (0) 20 7387 8890 
-- 
New Zealand 
http://www.thoughtbubble.co.nz/ 
Tel: +64 (0) 9 488 9131 
-- 
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.



-Original Message-
From: Michael Vinson [mailto:[EMAIL PROTECTED]]
Sent: 18 September 2001 15:34
To: CF-Talk
Subject: checkboxes to action pages


Hi,

I have a list of records (to delete) with checkboxes. i.e. user wants to
delete recs & clicks checkbox
Once the user clicks submit (Delete) Here's what I know:
- How many items in the list
- My 'index' to the list (using email address), which contains a subset
of the query displayed in the form. Note that the number of email
addresses I capture is equal to the total number of items in list.

Here's what do not know:
- How to match my form checkbox name (delChecked) to my data as
described above! The parameters that get passed to my 'action page'
reveal (to me, at least) a compressed list showing data (e.g. on,on,on)
but how in the world do I match this to... item 1 checked, item 3
checked, item 5 checked

Ain't learning great!

Thank in advance ... -Mike

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: checkboxes

2001-07-04 Thread Howie Hamlin

Something like:

update blah where something set (

   Status,


values (

  1

  0



Basically, if the form field exists then the user has checked the box.

HTH,

Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc.
www.CoolFusion.com
631-737-4668 x101
inFusion Mail Server (iMS) - The Intelligent Mail Server
Join the DevCon community at www.coolfusion.com/devcon

- Original Message - 
From: "Jones, Becky" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 4:19 PM
Subject: checkboxes


> i have a form that has a list of articles. and next to each article there is
> a checkbox. and it displays that it is checked like so:
> checked
> value="1">
> if the article is "live"
> does anyone know how i would write the update statement?  ive tried
> everything, and i cant get it to work.
> thanks,
> bec.
> 
> 
> *
> This e-mail, including any attachments, is intended for the 
> receipt and use by the intended addressee(s), and may contain 
> confidential and privileged information.  If you are not an intended 
> recipient of this e-mail, you are hereby notified that any unauthorized 
> use or distribution of this e-mail is strictly prohibited. 
> 
> 
> 
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Checkboxes define tables...

2001-05-21 Thread Raymond Camden

If each form field is named services then the value of Form.Services will be
a list of all the checkboxes selected. So, if you had this:

1
2
3

and the user selected 1 and 3, the value of Form.Services would be 1,3.

Now, you ask, "how can I tell it to write something like 'on' in each
services field that's check."

Are you asking about how to make them preselected when the form redisplays?
Or how to save them to a DB?

If you want to know how to make them preselected, simply...



CHECKED>1
CHECKED>2
CHECKED>3

and so on.

Does this help?

===
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -Original Message-
> From: Tony Hicks [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 21, 2001 7:35 AM
> To: CF-Talk
> Subject: Checkboxes define tables...
>
>
> I have a form with 13 checkboxes each named Services but with
> different values.. is there a way i can tell it to write
> something like 'on' in each services field that's checked from
> the form? Without alot of useless cfifs and stuff?
>
> Thanks,
> Tony Hicks
>
>


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: checkboxes

2000-10-26 Thread Randy Adkins

Look dude, if you read what he asked it said
'ONLY THE BOX THAT WAS CHECKED' this indicates
ONE not multiples...

Thus the best solution is radio buttons.

I am not as petty to get into name calling as
you have illustrated your maturity.




-Original Message-
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 7:15 PM
To: CF-Talk
Subject: RE: checkboxes


You Idiot Randy! It was nice to see another solution to the opposite of his
problem, however he did say he wanted a list of the selected items and radio
buttons don't allow multiple selections as you point out:-)

regards

Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693
* [EMAIL PROTECTED]


-Original Message-
From: Randy Adkins [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2000 01:09
To: CF-Talk
Subject: RE: checkboxes


You can use radio buttons to better do what you wish.

Something like:







This way when the 2nd one is checked the first one
becomes 'unchecked'. Thus the value is now 2.

If you must use check boxes, I would do something like:






Only problem is when you test to see if thisbox1 isdefined
and insert it into the DB, what happens is if both
box 1 and 2 was checked. Thus I would use the radio buttons.

HTH

Randy


-Original Message-
From: Peter Benoit [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 9:58 AM
To: CF-Talk
Subject: checkboxes


Hi,

I have 5 checkboxes on a form, and I want to submit to a database only the
box that was checked.  How can I do this?

Thanks



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]




Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: checkboxes

2000-10-25 Thread BORKMAN Lee

Hey, it's that nice banker again ;-)

-Original Message-
From: Scott, Andrew [mailto:[EMAIL PROTECTED]]

You Idiot Randy! ...
regards

Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]



IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: checkboxes

2000-10-25 Thread Scott, Andrew

You Idiot Randy! It was nice to see another solution to the opposite of his
problem, however he did say he wanted a list of the selected items and radio
buttons don't allow multiple selections as you point out:-)

regards

Andrew Scott
Senior Cold Fusion Application Developer
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-Original Message-
From: Randy Adkins [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2000 01:09
To: CF-Talk
Subject: RE: checkboxes


You can use radio buttons to better do what you wish.

Something like:







This way when the 2nd one is checked the first one
becomes 'unchecked'. Thus the value is now 2.

If you must use check boxes, I would do something like:






Only problem is when you test to see if thisbox1 isdefined
and insert it into the DB, what happens is if both
box 1 and 2 was checked. Thus I would use the radio buttons.

HTH

Randy


-Original Message-
From: Peter Benoit [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 9:58 AM
To: CF-Talk
Subject: checkboxes


Hi,

I have 5 checkboxes on a form, and I want to submit to a database only the
box that was checked.  How can I do this?

Thanks



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]




Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: checkboxes

2000-10-25 Thread Randy Adkins

You can use radio buttons to better do what you wish.

Something like:







This way when the 2nd one is checked the first one
becomes 'unchecked'. Thus the value is now 2.

If you must use check boxes, I would do something like:






Only problem is when you test to see if thisbox1 isdefined
and insert it into the DB, what happens is if both
box 1 and 2 was checked. Thus I would use the radio buttons.

HTH

Randy


-Original Message-
From: Peter Benoit [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 9:58 AM
To: CF-Talk
Subject: checkboxes


Hi,

I have 5 checkboxes on a form, and I want to submit to a database only the
box that was checked.  How can I do this?

Thanks



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: checkboxes

2000-10-25 Thread Simon Horwith

give them all the same name.  any checked  will be returned as members of a
list( of values).  If one is checked, one is returned.  Be sure to use
CFPARAM or some other code to handle if nothing was checked.

~Simon

-Original Message-
From: Peter Benoit [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 9:58 AM
To: CF-Talk
Subject: checkboxes


Hi,

I have 5 checkboxes on a form, and I want to submit to a database only the
box that was checked.  How can I do this?

Thanks



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: checkboxes in a list

2000-09-25 Thread Scott, Andrew

Run a cfloop on the list then do a comparison against the person if it
matches then do a checked on the input type:-)

regards

Andrew Scott
ANZ eCommerce Centre
* Ph 9273 0693  
* [EMAIL PROTECTED]


-Original Message-
From: Albert, Gregory Mitchell (Greg) [mailto:[EMAIL PROTECTED]]
Sent: 26 September 2000 15:30
To: CF-Talk
Subject: checkboxes in a list


I am designing an administration area and I need to assign a single page to
multiple people. Because I don't know how many people will need access and
because I'll be adding/deleting people all the time, I need to make all of
the values go into the same field (userPermissions) in the database.

The "pages" table has the following fields: pageID, pageDescription,
userPrivileges.

My code looks something like this:


#userID#


I can submit these values without a problem. A comma-delimited list is
inserted into the DB.

My problem is that when I try to edit the page to change permissions, I
can't see who was selected (or checked) before and who wasn't.

I know this is a common problem, but I haven't been able to find any
articles that really explain the problem I'm running into. I know it's
something simple that I'm just not seeing.

Can anyone shed some light on my problem? Thanks in advance!

Greg Albert


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: checkboxes in a list

2000-09-25 Thread Jim McAtee

Greg,

Assuming your list of user id's is also named 'userPermissions', try:

 checked>#userID#


Jim


-Original Message-
From: Albert, Gregory Mitchell (Greg) <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Date: Monday, September 25, 2000 10:30 PM
Subject: checkboxes in a list


>I am designing an administration area and I need to assign a single
page to
>multiple people. Because I don't know how many people will need access
and
>because I'll be adding/deleting people all the time, I need to make all
of
>the values go into the same field (userPermissions) in the database.
>
>The "pages" table has the following fields: pageID, pageDescription,
>userPrivileges.
>
>My code looks something like this:
>
>
>#userID#
>
>
>I can submit these values without a problem. A comma-delimited list is
>inserted into the DB.
>
>My problem is that when I try to edit the page to change permissions, I
>can't see who was selected (or checked) before and who wasn't.
>
>I know this is a common problem, but I haven't been able to find any
>articles that really explain the problem I'm running into. I know it's
>something simple that I'm just not seeing.
>
>Can anyone shed some light on my problem? Thanks in advance!
>
>Greg Albert


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Checkboxes....

2000-08-25 Thread Mr G Lewis

Nick,
Many many thanks for digging out the thread messages and 
sending them to me.  You are right this is the same question.  I 
don't entirely understand the answer though:




 
 



I would have a loop within the cfform as I guess is implied above
How do the values of the selected checkboxes get added to the list 
before the submit button is pressed and how is that list passed to 
the next template - as an  ?

or are we ignoring the normal checkbox FORM values and using the 
list instead?

Graham

> > This has almost certainly been asked before... 
> Yesterday in fact :-)
> The thread is called "picking up form variables on the action page??"

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Checkboxes....

2000-08-25 Thread DeVoil, Nick

> Thing is I only rejoined the list today.  

Sorry Graham, will forward you the thread off list.

Nick


**
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Checkboxes....

2000-08-25 Thread Mr G Lewis

Nick,

> Yesterday in fact :-)
> The thread is called "picking up form variables on the action page??"

Thing is I only rejoined the list today.  I can see one tail end of that 
thread but it is only talking about checking the existance of FORM 
varaiables.  Perhaps the start oif the thread refered to my question 
but I cannot access those messages (they do not seem to be in the 
archives yet) 

My question is to do with passing checkbox FORM variables whose 
names are dynamically generated in the form.

I can't send them as as an array (I guess a form variable cannot be 
an array ... I experimented and it didn't work) without resorting to 
WDDX or somesuch so I am sending them as

Item_1Item_n

My problem is is looping through those in the next template and 
inserting their values into the database.

I am trying to write the ones that get passed to an array and then 
looping through that to do the inserts but it is clunky and anyway 
doesn't work at the moment.

Graham
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Checkboxes....

2000-08-25 Thread DeVoil, Nick

> This has almost certainly been asked before...

Yesterday in fact :-)
The thread is called "picking up form variables on the action page??"

Nick


**
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Checkboxes Update

2000-04-12 Thread John Quarto-vonTivadar

Hi Jeff,

well on your display page you want to do several things

1) name all your checkboxes the same (that way a single variable, called
FORM.yourcheckboxname will get passed to the action page
2) generate a list of the currently checked items (the ones checked before
the user starts toggling). Store in a hidden field, since you will want to
use this later on the action page. If you get these from a DB then you can
just convert the query to a list. For example you have a list of categorys
and the persons has some favorites already chosen. You get these from a DB
and also convert it as well as a query of *all* the categories. Loop thru
the full list and for each one if CategoryID is also part of the user-chosen
list you just made then set its value to CHECKED. This gets you a full
display of all the checkboxes with the ones previously checked now
pre-checked. You've also stored the previously checked ones in a list
variable in a hidden field of the form.
3) on the action page do this:  oldlist is a list of your previously chosen
categorys. Newlist comes directly from the checkboxes all being named the
same---and only the ones that are checked when the form gets submitted will
come thru. Then compare as below to see what is new and what is old,
updating the DB throughout.






 
  
   INSERT INTO Persons2Categorys (
PersonID,
CategoryID
)
   VALUES (
#SESSION.User.ID#,
#item#
)
  
 




 
  
   DELETE FROM Persons2Categorys
   WHERE 0=0
   AND  CategoryID = #item#
   AND  PersonID = #SESSION.User.ID#
  
 


hope that helps.

- Original Message -
From: Jeffrey M. Placzek <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 12, 2000 11:07 PM
Subject: Checkboxes Update


> This is a multi-part message in MIME format.
>
> --=_NextPart_000_0029_01BFA4CB.75848A40
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> This may be a basic question but...
>
> I need to update multiple checkboxes on an update form... how do I get =
> it to pass the checked or unchecked state to the update form? or radio =
> buttons? or drop down menus?
> In desperate need.. all you pros please respond to my email address =
> right away if you can
> Insanity is about to set in. help...
>
> -Jeff
>
> --=_NextPart_000_0029_01BFA4CB.75848A40
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> 
> 
>  http-equiv=3DContent-Type>
> 
> 
> 
> 
> This may be a basic question =
> but...
>  
> I need to update multiple checkboxes on =
> an update=20
> form... how do I get it to pass the checked or unchecked state to =
> the=20
> update form? or radio buttons? or drop down menus?
> In desperate need.. all you pros please =
> respond to=20
> my email address right away if you can
> Insanity is about to set in.=20
> help...
>  
> -Jeff
>
> --=_NextPart_000_0029_01BFA4CB.75848A40--
>
> --

> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.