You are close, but there is no need for the extra pound signs(#) inside of your <cfif> statement. Good job with using the isDefined() function. If the variable doesn't exist, CF will short circuit your condition at that statement and save some processing time by ignoring the rest. It also prevent you from possibly "disovering bugs" in the application later on.
If you want to read a good document on correct ways to write your conditions, or when to use the proper tags, ect.. then you should check out "ColdFusion MX Coding Guidelines". It a well rounded document with suggestive techniques for following good practice, and writing efficient code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.