I've taken care of this CFIF. It is gone now. I've added instead a cfparam, thanks to Michael Tangorre's suggestion.
<cfparam name="form.outrosmeses" default="" />
The problem is, now I don't get an error, but the variable assumes an inicial value of ' ' the first time around, and is ceched. So, if you try to see information fot a previous month, it assumes, not the date you selected, but the value before that.
I confess, I'm confused. :)
TIA,
Pedro Mendes
> -----Original Message-----
> From: Pedro Mendes
> Sent: quinta-feira, 15 de Abril de 2004 14:33
> To: '[EMAIL PROTECTED]'
> Subject: Passing a form value in its action attribute
>
> Hello all,
>
> This is an example page of the problem I'm stuck with:
>
> http://web3.cmvm.pt/SDI/fundos/carteiras/fim/dtlcart_fim.cfm?NUM_FUN=159&data1=31/03/2004
>
> I populate the drop down box that you see near the bottom of the page, with the results of a query. When I select one of the dates, I want the page to reload with the data for the selected date
> I've been banging my head, and so far I've come up with this, needed because #outrosmeses# is undefined the first time the page loads.
>
> <cfif isdefined("outrosmeses")>
> <cfform action="" method="POST">
> <cfselect name="outrosmeses"
> query="qOutrosMeses"
> value="data1"
> display="meses">
> </cfselect>
> <INPUT type="submit" name="submit" value=" Consultar ">
> </cfform>
>
> <cfelse>
> <cfform action="" method="POST">
>
> <cfselect name="outrosmeses"
> query="qOutrosMeses"
> value="data1"
> display="meses">
> </cfselect>
> <INPUT type="submit" name="submit" value=" Consultar ">
> </cfform>
> </cfif>
> <cfoutput><p> mes seleccionado: #outrosmeses#</p></cfoutput>
>
>
> Can this be done? Hope this doesn't look too confusing. If you could reply personaly, it would be great, as time is runing out, and I'm stuck.
> Thank you so much!
> Pedro
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

