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.