Hi guys,
I have a calendar of daily rates (see below). I am using cfloop to loop
from the checkin to the checkout date. The calendar displays fine but
the value of 'idx' appears as...
39049
39050
39051 ... ??
It should appear as the date of that particular day?
Can anyone see what is causing this odd output.
Cheers
Mike
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr><cfoutput>
<cfloop from="1" to="7" index="Request.idx">
<td class="calTitle"><div
align="center"><strong>#left(dayOfWeekAsString(Request.idx),
3)#</strong></div></td>
</cfloop>
</cfoutput></tr>
<tr>
<cfset nPadding = DayOfWeek(getBooking.dCheckin) - 1>
<cfset padding_string = RepeatString("<td
class=""pad""> </td>", nPadding)>
<cfoutput>#padding_string#</cfoutput>
<cfset day_idx = nPadding>
<cfloop from="#getBooking.dCheckin#"
to="#getBooking.dCheckout#" index="idx" >
<cfoutput>
<td valign="top" class="day"><div align="center">
<div><strong>#idx#</strong></div>
<div>$
<input type="text" name="rate" size="5"
class="formtext">
</div>
</div></td>
</cfoutput>
<cfset day_idx = day_idx + 1>
<cfif day_idx EQ 7>
</tr>
<cfset day_idx = 0>
<cfif idx LT getBooking.dCheckout>
<tr>
</cfif>
<!--- Now we need to do a pad at the end, just to make our
table "proper" we can figure out how much the pad should be by
examining day_idx --->
</cfif>
</cfloop>
<cfset nPadding= 7 - day_idx>
<cfif nPadding LT 7>
<cfset padding_string = RepeatString("<td
class=""pad""> </td>", nPadding)>
<cfoutput>#padding_string#</cfoutput></tr>
</cfif>
</table>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:260030
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4