That did the trick, thanks!  Very annoying to realize these differences
between POST and GET this late in the game ;-)  I'll test later to see if
Mozilla does the same thing.

Pete

----- Original Message -----
From: <"Everett>; <Al <[EMAIL PROTECTED]>>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 3:44 PM
Subject: RE: Differences in SELECT type="multiple" on POST and GET methods


> > The application I'm working on originally used POST methods
> > for form submissions.  On SELECT TYPE="MULTIPLE" fields, the
> > output was handled very nicely and the data was posted as
> > "somefield=value1,value2,value3" if multiple items were
> > selected.  This made dealing with the values very simple for
> > many reasons.
> >
> > However, for various reasons, I have had to convert
> > everything over to use the GET method for form submission.
> > On the same SELECT TYPE="MULTIPLE" field, the data is now
> > sent as "somefield=value1&somefield=value2&somefield=value3"
> >
> > Is there a simple way to "convert" the data that looks like
> > "somefield=value1&somefield=value2&somefield=value3" into
> > values that look like "somefield=value1,value2,value3"?  Do I
> > loop through it treating SOMEFIELD as a collection?  Is there
> > an easier or more straightforward way of doing this?  I'm
> > using CF5 Ent.
>
> Well, I would have thought that URL.somefield is still
> "value1,value2,value3" but that's apparently not true. Hmph.
>
> You could treat the string as a list with & as the delimiter and use a
loop.
>
> <cfset newstring="">
> <cfloop list="#CGI.QUERYSTRING#" index="i" delimiter="&">
> <cfif ListFirst(i,"=") EQ "somefield">
> <cfset newstring=ListAppend(newstring,ListLast(i,"="),",")>
> </cfif>
> </cfloop>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
                                

Reply via email to