Hi:

I'm building a scheduler that only shows a week at a glance (horizontally)
and time slots (vertically).  When a user presses the Next button, I can
only get it to go to the next week and no further.  Same thing with the
Previous button.  Here's some code snipplets.  My brain is fried at the
moment.  Any help on this is greatly appreciated.

<!---  set some variables --->
<CFPARAM NAME="CurrentDate" DEFAULT="#now()#">
<CFPARAM NAME="CurrentYear" DEFAULT="#Year(CurrentDate)#">
<CFPARAM NAME="CurrentMonth" DEFAULT="#Month(CurrentDate)#">
<CFPARAM NAME="CurrentDay" DEFAULT="#Day(CurrentDate)#">
<CFPARAM NAME="Form.WeekChange" DEFAULT="">

<!---  sets the start, end and maximum number of weeks --->
<CFSET STARTWEEK = CURRENTDATE>
<CFSET ENDWEEK = CURRENTDATE + 6>
<CFSET MAXWEEK = CREATEODBCDATE(DATEADD('WW', 4, NOW()))>

<!---  stuff to handle the form --->  (Problem Area I think)
<CFIF ISDEFINED("Form.WeekChange")>
 <CFIF FORM.WEEKCHANGE IS 'NEXT'>
  <CFSET STARTWEEK = ENDWEEK + 1>
  <CFSET ENDWEEK = STARTWEEK + 6>
</CFIF>
</CFIF>

<!---   output --->
<!---  Week At A Glance --->
  <TR>
  <CFOUTPUT>
  <CFLOOP INDEX="current_week" FROM="#startweek#" TO="#endweek#">
    #DateFormat(current_week, 'MMMM,DD,YYYY')#
   </TD>
 </CFLOOP>
  </CFOUTPUT>
  </TR>



Yvette Ingram
Email: ingramrecruiting@erols or
[EMAIL PROTECTED]
ICQ:  21200397




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to