Ben Forta

Blog

November 12, 2000

Script Object Calls

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

Learn HTML By "Peeking"

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 9, 2000

How To Use Nested Tags

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

Use to Simplify Messy Scripting

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

Trim all Database Fields Before Using Them in Forms

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

Always Encode URL Parameters

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

Expecting Specific Data Types

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

Simplifying Working With Variables

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

Referring to RGB Colors Within CFML Code

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:...

Page 484 of 489 (4890 posts)