Mitko: 

You'll need some javascript to accomplish this.  In your <form> tag, add an 
onSubmit='doFunction()' 

in your doFunction function (and please, feel free to give it a less silly 
name), reference the form fields and change the action of the form. 

to reference the value of a select:
document.formName.selectName.options[document.formName.selectName.selectedIn 
dex].value 

to change the action:
document.formName.action = 'newActionPage.cfm'; 

at the end, submit it using:
document.formName.submit(); 

If you need clarification, contact me offlist and i'll get more specific 
with the code. 

charlie 

Mitko Gerensky-Greene writes: 

> Hello, 
> 
> I have a page with a form with two drop down menus -- for state and fiscal year. I 
>want the action (target) of the form to be a page whose directory is defined by the 
>fiscal year selected and whose file name is defined by the state selected. 
> 
> I.e. from select_plan.cfm (the page with the form) I want to be able to go to 
>/fy2002/va.cfm if Fiscal Year 2002 and Virginia were selected from the menu options 
>in the form. 
> 
> I understand that I cannot have the following: 
> 
> <form action="file="/#fiscalyear#/#statecode#.cfm" method="post" name="info"> 
> 
> where both fiscalyear and statecode are selected in this same form. 
> 
> How can I implement this? 
> 
> Thanks in advance, 
> 
> Mitko
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to