Using CFHTMLHEAD

Last week one of my team members gave a presentation to the rest of us on Coldbox. We are using this framework for a project and we were discussing the basics of convention and how to work with the different layers - which brought up the question, where exactly is the optimal place to put the Javascript in this?.

I used this opportunity to bring up the CFHTMLHEAD tag, which allows you to place code into the head tag from anywhere on the page. This would allow us to keep Javascript from loading on unnecessary pages and still keep everything componentized. I also thought this would be a good opportunity to discuss basic CFHTMLHEAD usage.

[More]

Debugging Javascript using Firebug in Browsers other than Firefox

Here is a neat Javascript tool that I recently discovered: Firebug Lite – a Javascript library that integrates Firebug into the DOM of any browser (like Internet Explorer, Chrome and Safari).

[More]

Custom JS Validation in CFFORM - Validating multiple email addresses

This is another entry about customizing ColdFusion's built-in JavaScript validation. One form that I work with here allows a user to enter multiple email addresses separated by a comma or semi-colon. The thing is, I can't use an attribute of validate="email" on the input because it will always fail due to there being multiple email addresses, semi-colons and commas.

Here is a little bit of custom JavaScript validation that I developed so that we can continue to use the CFFORM's validation, validate the multiple email addresses that may be entered and limit the number of email addresses that can be submitted.

[More]

Custom JS Validation in CFFORM - When Javascript is turned off

This is an expansion on Isaac's entry, Mixing CFForm and custom javascript validation. In his blog entry, he tells us how to manipulate Coldfusion's built-in JavaScript validation in CFFORM to include your own custom validation.

I immediately wanted to try it out, because having CFFORM override my custom validation was a major blow to my enthusiasm in using this CFFORM feature. Basically, what he does is switch out a submit button for a regular button and added an onclick to the new button. The problem here is what happens when JavaScript is turned off - the form won't submit!

[More]

Basic Page Optimization

Page load time is very important, if a page takes too long to load some users will just leave and may never come back. Below are two tools that I find very useful when doing page optimizations.

[More]

Mixing CFForm and custom javascript validation.

Before CFFORM and CFINPUT validation made it easy to validate form inputs with such CFINPUT attributes as required="true" and message="email is required" developers wrote thier own custom javascript validation and believe it or not most web developers still do. The reson for this is because Coldfusions CFFORM validation still cant do everything you need it to, however there are some powerful CFINPUT validations I find extremely useful in form development.

One I find extremely useful is the CFINPUT attribute "validate", which can be used to validate many types of user input such as an email, credit card number, date, ect.

So what do you do when you have a HTML form that validates user input with custom javascript called from an onSubmit call in the form tag but want to use Coldfusions CFINPUT validation. Chances are you tried changing the FORM to CFFORM and found your custom javascript stopped working and hastily decided CFFORM broke your javascript.

[More]

Debugging CF8's built-in AJAX functionality

One plus side to Coldfusion 8 is that there are quite a few tags that can be used to implement AJAX functionality in your interface. One downside to this is that Firebug (everyone's favorite Firefox extension and JavaScript debugging tool) doesn't always pick up errors with the AJAX that is executed with these tags. Following is a guide to setting up Coldfusion's built-in debugger for the CF8 tags that use AJAX.

[More]

Testing in Internet Explorer

As many of us know, testing in Internet Explorer is tough because you can't run multiple versions of IE on the same computer (and the same CSS can render VERY differently across versions).

This is a neat tool that Cindi passed along to the rest of the Ravenglass team a couple of weeks ago. This allows you to test the way JavaScript and CSS are rendered across the different versions of IE, without having to jump through hoops.

http://www.my-debugbar.com/wiki/IETester/HomePage

I installed it this week because I have been doing some redesign work, with some CSS that might not be compatible across browsers and I am hooked! Testing across browsers was a breeze with this - so compelling that I had to write a quick blog entry about it.

'Til next time, Bridget

BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner