Cedric:

on the form's action page, you can loop over the #cgi.query_string# variable, using the & character as a delimiter:

<cfset foodList = "">

<cfloop list="#cgi.query_string#" delimiters="&" index="i">
    <cfset foodList = listAppend(foodList, listLast(i, '='))>
</cfloop>

<cfoutput>#foodList#</cfoutput>

...and for whatever it's worth, in CFMX a querystring like this actually does return a comma delimited list...so <cfoutput>#URL.foods#</cfoutput> would give you the list you expected (just in case you were looking for that *one more* reason to upgrade)  : )

charlie

  ----- Original Message -----
  From: Cedric Villat
  To: CF-Talk
  Sent: Monday, December 22, 2003 3:06 PM
  Subject: Re: Select Multiple and GET forms

  Peter,

  Yes, I have to use GET since I want the variables in the URL. I know #form.foods# gives me the comma-delimited list, but why doesn't #url.foods#? Any more ideas?

  Cedric

  > Any reason why you are using GET an not POST?
  >
  > Using post you would reference #Form.Foods# for a comma delimited list
  > of
  > selections.
  >
  > Peter Tilbrook
  > Transitional Services - Enterprise eSolutions
  > Centrelink (http://www.centrelink.gov.au)
  > 2 Faulding Street
  > Symonston ACT 2609
  >
  > Tel: (02) 62115927
  >
  >
  >
                                                                                                                                         
  >
                        
  > "Cedric Villat"                                                                                                  
  >
                        
  > <[EMAIL PROTECTED]        To:       CF-Talk <[EMAIL PROTECTED]>                                          
  >
                        
  > com>                     cc:                                                                                    
  >
                                                
  > Subject:  Select Multiple and GET forms                                                
  >
                        
  > 23/12/2003 09:39                                                                                                
  >
                        
  > Please respond to                                                                                                
  >
                        
  > cf-talk           
  |
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to