I haven't tested this, but how about:
<cfloop list="x=1&y=2" index="thisPair" delimiters="&">
<cfset fieldname=listGetAt(thisPair, 1, "=")>
<cfset fieldvalue=listGetAt(thisPair, 2, "=")>
<cfhttpparam type="FORMFIELD" name="#fieldname#" value="#fieldvalue#">
</cfloop>
> -----Original Message-----
> From: PC [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 06, 2000 4:06 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Parsing alg HELP needed
>
>
> This is helpful... but the one thing that is challenging is that I am not
> handling a form but instead a name value pair string like
> "x=1&y=2&" etc ...
> so I have to pull the pairs out and then also dynamically create and fill
> out CFHTTPPARAM tags ...I guess not the simplest thing...:)
>
> ----- Original Message -----
> From: Tim Lieberman <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 05, 2000 4:46 AM
> Subject: Re: Parsing alg HELP needed
>
>
> > the keys are produced by the input names, and the values are
> user supplied
> > data.
> >
> > Why not something like:
> >
> > <cfset namelist= "">
> > <cfset valuelist="">
> > <cfscript>
> > ListAppend(namelist,"formfieldname1">
> > ListAppend(valuelist,#form.formfieldname1">
> > ListAppend(namelist,"formfieldname2">
> > ListAppend(valuelist,#form.formfieldname2>
> > ...
> > ListAppend(namelist,"formfieldnameN">
> > ListAppend(valuelist,#form.formfieldnameN>
> > </cfscript>
> >
> >
> > Of course, you might want to get tricky and make it dynamic. I suspect
> you
> > can loop over the form scope and dynamically get all the names, etc.
> >
> > Hope this is what you want.
> > At 02:25 AM 00/04/06 -0700, you wrote:
> > >I am trying to parse some name/value pairs that are POSTed in
> queries. I
> > >want to be able to recontruct searches basically and therefore
> need to be
> > >able to pull out the names and values in strings like the one below.
> > >
> > >Can anybody recommend approaches? Like which combination of
> functions in
> CF
> > >would best get me say two CF lists - one for names and one for
> values....
> > >
> > >eg: NameList: (qt,qs,qc,ws) ValueList: (monkey,4,jog,0)
> > >
> > >is parsed from ...
> > >"qt=monkey&qs=4&qc=jog&ws=0"
> > >
> > >THX!
> > >
> > >Dan
> > >
> >
> >-----------------------------------------------------------------
> ----------
> > ---
> > >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.
> >
> >
>
> Tim Lieberman Take a break and have a listen,
> Electric Mind Control Do It NOW:
> Workshop & Funk Bakery http://www.mp3.com/emcw
> --------------------------------------------------------------------------
----
> 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.
------------------------------------------------------------------------------
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.