Category Archives: Snippets

quick code tips for single elements, attributes, or details

cfselect and query values

Similar to binding to a cfc but binding with a query on the same page. Notice the query and value attributes and how they relate to the query. I added an ” All” as a default. <cfquery name=”get_last_names” datasource=”mydsn”> select … Continue reading

Posted in Code, Coldfusion, Snippets | Comments Off on cfselect and query values

Coldfusion cfoutput grouping

The cfoutput tag has a group attribute that lets you group your data for reports. The outer most cfoutput must have the query name and the group but the inner groups can not have the query name. In the following … Continue reading

Posted in Code, Coldfusion, Snippets, SQL | Comments Off on Coldfusion cfoutput grouping

Javascript User entry validation

I have a form with an ID input box. If the id is less than 6 characters i want to disable the submit button until it reaches the 7th character. What I found was that users sometimes Type their id, … Continue reading

Posted in Code, Javascript, Problems & Fixes, Snippets | Comments Off on Javascript User entry validation

Javascript – Test if form element exists

var myobj = document.form.fieldname; if (myobj != null || myobj != ‘undefined’){ //do something }

Posted in Code, Javascript, Snippets | Comments Off on Javascript – Test if form element exists

Coldfusion and Pausing Javascript

I had an interesting problem this week. I had a page with a CFQuery, a CFLoop to output the query, and a javascript function. The problem was that the javascript function was occurring before the loop would draw the output. … Continue reading

Posted in Code, Coldfusion, Javascript, Problems & Fixes, Snippets | Comments Off on Coldfusion and Pausing Javascript