[thelist] CF: stupid checkbox problem

jeff jeff at members.evolt.org
Wed Feb 7 18:53:40 CST 2001


ben,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Ben Dyer
:
: <CFIF #ParameterExists(TheCheckbox)# IS 'No'>
:   <CFSET TheCheckbox = 'No'>
: </CFIF>
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

first, avoid the use of the ParameterExists() function like the plague.
it's been deprecated in favor of the IsDefined() function.  however, rather
than checking it's existence and giving it a value if it doesn't exist, why
not just define it with a default value to begin with?  not only does it
require no additional time to process compared to your method, but it's
infinitely more readable, not to mention fewer lines of code.

second, the hashes (#) around the ParameterExists() function are unnecessary
because they're inside a cf tag.  eliminate the hashes and it'll still work
and be more correct (according to the cf docs).

thanks,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list