When I change my code to the following I get back 2 of the same 
values in
the current quarter.  The only difference between these values are 
that one
is the editible input box and the other is the plain output.  If I 
change
the input box it'll change the plain output.  How do I get it to show 
only
the input box for the current quarter. I'm kind of confused on why it 
is now
showing twice, is it reading the quarter to be something else?

<CFLOOP INDEX="X" FROM="1" TO="#(Quarter)#">
<CFIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.GradingPeriod EQ X) 
><CFSET
GradingPeriod=X><INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>
<CFELSE>#UCase(Grade)#
</CFIF>

-----Original Message-----
From: Janine Jakim 
Sent: Wednesday, July 18, 2001 8:55 AM
To: CF-Talk
Subject: how do i condense this?


I have a display page that I want the user to update if it is the 
current
quarter.  How do I make my code more efficient then this stuff I 
have???
The only way I've gotten it to work is when I hard code the quarter- 
what's
the best way to get rid of all of these cfif/cfelseif statements?
Thanks for any help

<CFLOOP INDEX="X" FROM="1" TO="#ListLen(Quarter)#">
<CFIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 1) ><CFSET
CLIENT.GradingPeriod=1>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>

<CFELSEIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 2) ><CFSET
CLIENT.GradingPeriod=2>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>

<CFELSEIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 3) ><CFSET
CLIENT.GradingPeriod=3>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>

<CFELSEIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 4) ><CFSET
CLIENT.GradingPeriod=4>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>

<CFELSE>#UCase(Grade)#
</CFIF>













-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 8:45 AM
To: CF-Talk
Subject: RE: Scoping Variable


CF automatically will search up if you only use "q". If you don't 
want that,
then specify URL.Q, or Variables.Q, or whatever. If you _want_ it to 
scope
up, just use "q".

======================================================================
=
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 9:35 AM
> To: CF-Talk
> Subject: Scoping Variable
>
>
> how do I enforce CF to use only "url.q" and not simply "q"
> i.e -  how to ask cf to search for scoping on every variable?
> where is it in the administrator?
>
> Thanks,
>
> Michael
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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