Passing a cfselect value as a url variable using cfpoutput to reload the page
Posted on 2003-11-19
HELP! I need to reload the current page using the value from the cfselect as a url variable.
Within the cfform is the following cfselect:
<cfselect name="ChooseWeek" style="word-spacing: 0; text-align: Left; list-style-type: disc; margin: 0" multiple = "No" >
<cfoutput query="GetWeekEnds" >
The query works fine and the cfselect loads fine. I want the user to be abkle to select an new Week Ending Date and then reload the page using that new date as the parameter for the query that selects records.
I want to execute something like:
<A HREF="timecardenter.cfm?WeekTime= <cfoutput>#URLEncodedFormat(TimeForm1.ChooseWeek)#</cfoutput>" >Show New Week</A>
I've tried many variations of this and they all fail because I can't seem to reference the ChooseWeek value. I've tried it within the cfform with no form identifier, outside the form with the TimeForm1 reference, etc.
Ideally it would execute when the used selects a new dat, but adding a separate button is okay too.
I'm sure I'm missing something easy. Any ideas will be greatly appreciated.