November 12, 2000
The ColdFusion tag is used to interact with COM, CORBA, and EJB components. ColdFusion 4.5 added a new function, CreateObject(), which does the exact same thing. If you are using , and find yourself having to play with long lists of tags, take a look at this new function. (Applies to: ColdFusion...
November 11, 2000
The best way to learn HTML (and JavaScript, and all client side technologies) is by looking at what someone else has done. You can do this in any Web browser (just do a View Source), but ColdFusion Studio has a better way. Select "Open From Web" from the File menu, and then specify a URL - Studio...
November 10, 2000
As of ColdFusion 4.5 FORM and URL are structures. As such, you can use all the Struct functions to access these variables, and can loop through them using . (Applies to: ColdFusion 4.5 (or later))
November 9, 2000
Using to invoke paired tags or tags with child tags? Be careful to match your and tags carefully. And if you are using associated tags, make sure that each has a matching , or use the XML style syntax . (Applies to: ColdFusion 4 (or later))
November 8, 2000
Have a long list of statements? Lots of loops and conditional processing? Take a look at the tag - it can greatly simplify some kind of scripting by allowing you to perform assignments, and conditional and loop processing using JavaScript style scripting. (Applies to: ColdFusion 4 (or later))
November 7, 2000
Depending on the data type used, many databases (for example, Microsoft SQL Server) pad returned data with spaces up to the length of the field. This is not a problem when fields are displayed (even if there is extra white space HTML will ignore it), but this can be quite annoying if the field is...
November 6, 2000
Any time you use an expression or variable to build a URL parameter, use the URLEncodedFormat() function to ensure that that value is URL safe. You should do this even if you know the value is safe (for example, a simple number). The function will do no harm if the value does not need encoding...
November 5, 2000
Using FORM forms or URL parameters and expecting specific data types (for example, a number)? Make sure you verify that the variable contains the correct type before you use it. You can do this using the CFML decision functions, or you could use the TYPE attribute. The latter is a more efficient...
November 4, 2000
Ever find yourself repeatedly checking if a variable exists (using the IsDefined() function) and then checking it's value? A faster (and more manageable) approach is to always ensure that variables exists with a bank of statements at the top of your page. Use these statements to assign default...
November 3, 2000
The # character has special significance in CFML, and ColdFusion assumes that every # delimits an expression. So how can you refer to RGB values which are usually in the format #FF00FF within your CFML code? By escaping the #. Specify ##FF00FF and CF will send #FF00FF to the browser. (Applies to:...