Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2006



Tip: Looking for answers? Try searching our database.

Creating a dynamic list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
expertnot - 28 Sep 2006 16:19 GMT
Need some help. I'm trying to create a pull down menu that will populate itself
with all dates between a start and stop date
I provide.

For example:

Start Date is 10/01/06
End Date is 10/05/06

The pull-down menu should provide the following date options:

10/01/06
10/02/06
10/03/06
10/04/06
10/05/06

I can do this when querying a table, but I can't seem to use the date function
to build it dynamically. Note, I'm using
CF version 5 on the server so any new features on CF7 are not available to me.

Any help will be greatly appreciated. Working on short timeline.

Thanks.
dempster - 28 Sep 2006 16:44 GMT
If you have a starting and ending date as date objects, you can use DateAdd to
increment a day at a time.

You can then use CFLOOP with a conditional to keep doing this until you get to
the end date. WIthin the loop, you create your select options.
expertnot - 28 Sep 2006 17:24 GMT
dempster,

Not sure how to use dateadd, but the conditional loop worked. It is now giving me the list of days. The select part should be easy.

Thanks for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.