As I may have mentioned early, I am attempting to move more towards script and away from tags in ColdFusion. Yesterday I worked with <cfif> and <cfelesif> which cause me no end of frustration for about 10 minutes until I realized I was being a moron.
I have a couple of sites that I redirect to new locations using code like this:
This now looks like this:
So what caused all the frustration? Two things: ColdFusion Builder, and my ignorance/reliance on the CF way. What I originally typed in the second test was elseif instead of else if. Since ColdFusion uses cfelseif, it did not dawn on me for a while that I left out the space and then, to add to the problem, ColdFusion Builder kept telling me there was an error “Missing semi-colon” — so not helpful. Like my ignorance with forms because of how easy cfform can be, I am learning that the same will be true for script. I just thought I would share so others can learn from my stupidity.