This is a perfect solution to the problem as it was posed. I have an
additional question, what should happen when the year rolls over and we
are back at january. In the example the list doesn't execute because
from 4 to 1, doesnt evaluate true.
So when the year rolls over is the "All Months" option then sufficient,
or should the list continue to add month in order?
Bryan Stevenson wrote:
> <cfset StartMonth = 4>
> <cfset EndMonth = Month(Now())>
>
> <select size="1" name="month1" >
> <option value="A" selected>All Months</option>
> <cfloop index="CurrMonth" from="#StartMonth#" to="#EndMonth#">
> <option value="#CurrMonth#">#MonthAsString(CurrMonth)#
> </cfloop>
> </select>
>
> Not tested...should work
>
> Cheers
>
> 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: Asim Manzur
> To: CF-Talk
> Sent: Thursday, June 24, 2004 12:18 PM
> Subject: from APRIL 2004 till current month
>
> <select size="1" name="month1" >
> <option value="A" selected>All Months</option>
> </select>
>
> How can I generate the dynamic months till this month from April in
> select box
>
> Regards,
> Asim Manzur
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- from APRIL 2004 till current month Asim Manzur
- Re: from APRIL 2004 till current month Bryan Stevenson
- Re: from APRIL 2004 till current month simeon
- Re: from APRIL 2004 till current month Bryan Stevenson
- RE: from APRIL 2004 till current month Douglas.Knudsen
- Re: from APRIL 2004 till current month Asim Manzur