As Dave said and here is an example:
File1.cfm
<cfform action="file2.cfm" method="post">
<cfselect name="RegionalSearch" size="4" style="width:230px">
<option value="0">Total population by
Community</option>
<option value="1">Total households by
Community</option>
<option value="2">Total employment by
Community</option>
<option value="3">School age pop. (5-17) by School
District</option>
</cfselect>
<input type="submit" value="Submit" />
</cfform>
File2.cfm:
<cfif isdefined('form.RegionalSearch')>
<!--- Do things with form results ---->
<cfoutput><p>#form.RegionalSearch#</p></cfoutput>
</cfif>
Paul
-----Original Message-----
From: Dave Phillips [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 3 December 2008 3:29 PM
To: cf-newbie
Subject: RE: Send option value from cfform
Christina, you can surely send the data to another page, but you had code
on the same page trying to display the results, and if you send the form to
another page, that code will never get executed. Just put your other page
in the 'action' attribute of cfform and move the 'display' code to the new
page and you should be fine.
Dave
-----Original Message-----
From: Christina K [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2008 2:14 PM
To: cf-newbie
Subject: Re: Send option value from cfform
Dave- I do need to post to a different page, so does that mean I can't use
the code you've shared? Is there any way to send the value of a hard-coded
cfselect option to another page? I have another cfform on the same page
that uses a dynamically generated drop-down list; this one allows me to pass
a value to the second page and correctly outputs the related data. I
suppose if need be I could create a mini table to house these options, but
that's probably not the best solution from the database standpoint...
Thoughts?
Thanks for all the help!
Christina
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4216
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15