IIF DE difference between ColdFusion 7 and 8

We just struck this problem because our developers use ColdFusion 8 on their local machines, then we deploy on ColdFusion 7. This is so we can fully test our apps on 8 before rolling it to production. We don’t really run into any issues, but here is one I just found. This issues is a […]

We just struck this problem because our developers use ColdFusion 8 on their local machines, then we deploy on ColdFusion 7. This is so we can fully test our apps on 8 before rolling it to production. We don’t really run into any issues, but here is one I just found. This issues is a line of code in a form tag that decides whether to launch java script validation code on submit or not, depending on the calling page.

On CF 8 this will work, not the third argument in IIF is simply ”

ColdFusion 7 throws an “Error: String index out of range: 0” message becasue DE of null is, well, nothing and it cant do anything with it. So for backward compatability we had to do this:

Note the DE(‘return true;’)

Duncan Isaksen-Loxton

Educated as a web developer, with over 20 years of internet based work and experience, Duncan is a Google Workspace Certified Collaboration Engineer and a WordPress expert.
Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.