Here goes:
<!--- create a list of URL variables and values --->
<cfset keysToStruct = StructKeyArray(URL)>
<cfset URLList = "">
<cfloop index="i" from="1" to="#ArrayLen(keysToStruct)#">
<cfset URLList =
ListAppend(URLList,"#keysToStruct[i]#=#url[keysToStruct[i]]#")>
</cfloop>
<!--- set var to hold all selections --->
<cfset AllSelections = "">
<!--- loop through URLList --->
<cfloop index="i" list="#URLList#">
<cfif ListGetAt(i,1,"=") eq "selMultiDaySelect">
<cfset AllSelections = ListAppend(AllSelections,ListGetAt(i,2,"=")>
</cfif>
</cfloop>
That should do the trick to yank all selected values for the multi select
box out of the URL param list. I haven't tested it, but it should fly ;-)
Enjoy
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]
---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: "James Blaha" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 17, 2003 3:44 PM
Subject: Re: Form Question for GET
> Bryan,
>
> I'm stuck using GET I can't use POST for this form. Thanks for your
> POST! Do you have an example of what your talking about to loop through
> the URL that you can POST back with the example I posted?
>
> Thanks Again!
> JB
>
> Bryan Stevenson wrote:
>
> >My first question would be....Why use GET? If you use POST you'll get
one
> >selMultiDaySelect var with a comma delimited list of selected values
(i.e.
> >FORM.selMultiDaySelect equal to "Mon,Wed,Fri").
> >
> >If you HAVE TO use GET, then I'd ltry something along these lines:
> >1) Loop over URL Param List
> >2) You have a list of lists. The first list is comma delimited and each
> >item in that list contains the var name and value (i.e. variable=value)
> >which is another list with "=" as a delimeter
> >3) If the current item starts with "selMultiDaySelect" then add it's
value
> >(using = as the delimiter for the list which is the current
> >item....ListGetAt() ) to a variable holding all selected options.
> >
> >HTH
> >
> >Bryan Stevenson B.Comm.
> >VP & Director of E-Commerce Development
> >Electric Edge Systems Group Inc.
> >t. 250.920.8830
> >e. [EMAIL PROTECTED]
> >
> >---------------------------------------------------------
> >Macromedia Associate Partner
> >www.macromedia.com
> >---------------------------------------------------------
> >Vancouver Island ColdFusion Users Group
> >Founder & Director
> >www.cfug-vancouverisland.com
> >----- Original Message -----
> >From: "James Blaha" <[EMAIL PROTECTED]>
> >To: "CF-Talk" <[EMAIL PROTECTED]>
> >Sent: Monday, March 17, 2003 3:24 PM
> >Subject: Form Question for GET
> >
> >
> >
> >
> >>Hello All:
> >>
> >>Form Question for GET
> >>
> >>How do I pick apart the URL values in a method = GET to have them be a
> >>list like in method equals post? I'm trying to insert the value of my
> >>form field into my database query and I realized only one value was
> >>getting passed to it. My issue is the URL has the form field name
> >>multiple time when the user selects more then one option.
> >>
> >>
> >><form name="myForm" action="Example_MultGET.cfm" method="get">
> >><select multiple name="selMultiDaySelect">
> >><option value="Mon">Monday</option>
> >><option value="Tue">Tuesday</option>
> >><option value="Wed">Wednesday</option>
> >><option value="Thu">Thursday</option>
> >><option value="Fri">Friday</option>
> >><option value="Sat">Saturday</option>
> >><option value="Sun">Sunday</option>
> >></select>
> >><hr>
> >><input type="submit" name="Submit" value="Search Applicants">
> >>
> >>
> >></form>
> >>
> >>Result:
> >>
> >>
> >>
> >>
>
>http://127.0.0.1/HR/Example_MultGET.cfm?selMultiDaySelect=Tue&selMultiDaySe
l
> >ect=Wed&selMultiDaySelect=Thu&Submit=Search+Applicants
> >
> >
> >><form name="myForm" action="Example_MultGET.cfm" method="post">
> >><select multiple name="selMultiDaySelect">
> >><option value="Mon">Monday</option>
> >><option value="Tue">Tuesday</option>
> >><option value="Wed">Wednesday</option>
> >><option value="Thu">Thursday</option>
> >><option value="Fri">Friday</option>
> >><option value="Sat">Saturday</option>
> >><option value="Sun">Sunday</option>
> >></select>
> >><hr>
> >><input type="submit" name="Submit" value="Search Applicants">
> >>
> >>
> >></form>
> >>
> >>Result:
> >>
> >>SELMULTIDAYSELECT=Tue,Wed,Thu
> >>
> >>
> >>Regards,
> >>James Blaha
> >>
> >>
> >>
> >>
> >>
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4