yes, however to not "hard code" the number of days, what I did, gets around that (although its very elementary, but it makes it a dynamic value)
...tony Tony Weeg Senior Web Developer UnCertified Advanced ColdFusion Developer Information System Design Navtrak, Inc. Mobile workforce monitoring, mapping & reporting www.navtrak.net 410.548.2337 -----Original Message----- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 3:52 PM To: CF-Talk Subject: RE: days in a month To make things easier, let's remove the HTML and just do: <cfloop index="firstday" from=1 to=31> <cfoutput>#firstday#</cfoutput> </cfloop> This looks much simpler, right? The mechanics of this is very simple. The CFLOOP tag simply says to loop from one number to another. In this case, it is from 1 to 31. The index="firstday" means that CF should create a variable, named firstDay, that will hold the current index of the loop. Make sense? ======================================================================= Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Member of Team Macromedia Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Tim Laureska [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 18, 2003 2:55 PM > To: CF-Talk > Subject: RE: days in a month > > > Thanks to all that responded... Raymond yours appeared the easiest... > I need to understand loops better or something, that was just > too easy... > > If someone would humor me or is real bored, could you explain > why/mechanics of how this works to produce the number list 1-31: > > <select name="firstday"> > <cfloop index="firstday" FROM="1" TO="31"> > <cfoutput> > <option value="#firstday#">#firstday#</option> > </cfoutput> > </cfloop> > </option> > </select> > > > > > > > > > > > > > > -----Original Message----- > From: Raymond Camden [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 18, 2003 3:18 PM > To: CF-Talk > Subject: RE: days in a month > > You are calling the daysInMonth function on a number, not a > real date, and you don't need it anyway. Just change the > option line to > > <option value="#firstday#">#firstday#</option> > > ============================================================== > ========= > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > Member of Team Macromedia > > Email : [EMAIL PROTECTED] > Blog : www.camdenfamily.com/morpheus/blog > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -----Original Message----- > > From: Tim Laureska [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, February 18, 2003 2:25 PM > > To: CF-Talk > > Subject: days in a month > > > > > > Hello. I'm trying to simplify the code for a drop down list > > of total # of possible days in a month (31). to look > > something like what I'm using to display months in a year, > > which looks like this: <select name="firstmonth" size="1"> > > <cfloop index="firstmonth" FROM="1" TO="12"> <cfoutput> > > <option value="#firstmonth#">#MonthasString(firstmonth)# > > </cfoutput> > > </cfloop> > > </option> > > </select> > > > > I tried the code below but it only returns the number 31 in > > the drop down box (I'm not sure this function was meant for > > this type of thing > > anyway): > > > > <select name="firstday"> > > <cfloop index="firstday" FROM="1" TO="31"> > > <cfoutput> > > <option value="#firstday#">#daysinmonth(firstday)# > > </cfoutput> > > </cfloop> > > </option> > > </select> > > > > Tim > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

