In fact we have several applications which allow us to do this...
<CFSCRIPT>
SQLString = "Select * From LoginInfo where UserID='user' and Password =
'password'";
DATASOURCE = "thisdb";
checkUser = CFQUERY(SQLString: SQLString, DATASOURCE: DATASOURCE);
if (checkUser.recordCount neq 0) {
CFOUTPUT("Welcome Back, " & checkUser.UserID);
} else {
CFOUTPUT("Your UserName is wrong, try again!");
CFLOCATION(theURL:"login.cfm");
}
</CFSCRIPT>
-----Original Message-----
From: Richard Hensman [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 09:51
To: CF-Newbie
Subject: RE: Conditional attributes[Scanned]
Will this even work if it's a cfinput? Surely you can't use a tag
within another cf tag? (between a <cfoutput> and a </cfoutput> yes, but
surely not within a <cfinput>.
-----Original Message-----
From: Stephen Moretti [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 09:48
To: CF-Newbie
Subject: Re: Conditional attributes[Scanned]
Robertson-Ravo, Neil (RX) wrote:
>You do not require IS "true".
>
>You can just use E.g.
><cfinput
> type="radio"
> name="myName"
> <cfif scope.myName>
> checked="yes"
> </cfif>
>
>
>
>This is better practice.
>
>
Even better practice is to make sure you close your <cfinput> too ;)
You might like the inline IF as an alternate.
<cfinput type="radio" name="myName"
#IIF(scope.myName,DE('checked="yes"),DE(''))#>
BTW - there's no real need for cfinput in this instance. You aren't
using any of its functionality, so an ordinary <input> will suffice.
Stephen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Captivate from House of Fusion, a Macromedia Authorized Affiliate and
support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=52
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:913
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54