This may help you understand,

<CFSET MYFIELD="TEXT">
<CFSET CHECKMYFIELD=IIF(ISNUMERIC(MYFIELD), DE("YES"), DE("NO"))>
<CFOUTPUT>#CHECKMYFIELD#</cfoutput>

-----Original Message-----
From: Steven Lancaster [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 5:03 PM
To: CF-Talk
Subject: RE: Radio Button


I looked it up (sorry). I tried to use the iif but I can't get it to work. I
will send a snippet and you can see what I am trying to do.


                  <cfloop query="check">
            <input type="radio" name="status" value="Not Assigned Yet"
#IIf(status is Not Assigned Yet, de("checked") ,de (""))#>
            <font face="Arial, Helvetica, sans-serif" color="#FF0000"><b>Not
Assigned 
            Yet</b></font></td>
        </tr>
        <tr>
          <td>
            <input type="radio" name="status" value="Work in Progress"
#IIf(status is Work in Progress, de("checked") ,de (""))#>
            <b><font face="Arial, Helvetica, sans-serif">Work In
Progress</font></b></td>
        </tr>
        <tr>
          <td>
            <input type="radio" name="status" value="Completed or Closed"
#IIf(status is Completed or Closed, de("checked") ,de (""))#>
            <font face="Arial, Helvetica, sans-serif"
color="#009900"><b>Completed 
            / Closed</b></font></td>
        </tr>
                </cfloop>

 Steven Lancaster
 WebMaster
 Core Laboratories
 6316 Windfern
 Houston, TX 77040
 713-328-2532 (Office)
 713-328-2150 (Fax)
 832-259-3010 (Cell)
 mailto:[EMAIL PROTECTED]

 http://www.corelab.com



-----Original Message-----
From: Lee Fuller [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 11:03 AM
To: CF-Talk
Subject: RE: Radio Button


Delayed Evaluation.. It's a function.

        Lee


> -----Original Message-----
> From: Steven Lancaster [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, November 13, 2001 8:50 AM
> To: CF-Talk
> Subject: RE: Radio Button
> 
> 
> what does iif and de stand for? I understand what it is 
> doing, I just don't understand the syntax.
> 
>  Steven Lancaster
>  WebMaster
>  Core Laboratories
>  6316 Windfern
>  Houston, TX 77040
>  713-328-2532 (Office)
>  713-328-2150 (Fax)
>  832-259-3010 (Cell)
>  mailto:[EMAIL PROTECTED]
> 
>  http://www.corelab.com
> 
> 
> 
> -----Original Message-----
> From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 10:48 AM
> To: CF-Talk
> Subject: RE: Radio Button
> 
> 
> > Is there any way to take a value out of a database and see if it 
> > matches a value on a radio button and if it does to check 
> that radio 
> > button? I have 3 radio buttons. I need to look at the 
> values and see 
> > if they match whichever
> > one matches I need to have that radio button checked. I 
> know this probably
> > and idiotic question (sorry).
> 
> CFIF or IIF()
> 
> <cfloop query="myQuery">
>       <input type="radio" name="myName" value="1" 
> #iif(myField is 1,de("checked"),de(""))#> 1<br> </cfloop>
> 
> You get the idea
> 
> Philip Arnold
> Director
> Certified ColdFusion Developer
> ASP Multimedia Limited
> T: +44 (0)20 8680 1133
> 
> "Websites for the real world"
> 
> **********************************************************************
> This email and any files transmitted with it are confidential 
> and intended solely for the use of the individual or entity 
> to whom they are addressed. If you have received this email 
> in error please notify the system manager.
> **********************************************************************
> 
> 
> 
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to