Web Trenches


Since the CFGRID component in ColdFusion 9 uses a newer version of Ext than CF8 did, there is a slight change that needs to be made to any scripts that use Ext's getDataSource() method to interact with the grid.  getDataSource() was replaced with getStore(). Since some of my applications need to run on both CF8 and CF9, […]



On several occasions I have had the need to modify a page's <TITLE> tag after it has already rendered.  Most commonly, this occurs when a Content Management System is generating the template.  For example, a news article site: index.cfm<cfparam name=”url.id” default=”” /><cfquery name=”getNewsArticle” datasource=”myDSN”>   SELECT id,title,body FROM NewsArticles   WHERE id = <cfqueryparam value=”#url.id#” type=”CF_SQL_VARCHAR” /></cfquery><cfoutput>  <h1>#getNewsArticle.title#</h1>  <p>#getNewsArticle.body#</p></cfoutput> […]



This is probably old knowledge, but for some reason I never ran into it until this week.  You should almost never use the RAND() function of MySQL in an ORDER BY. The ORDER BY RAND() operation actually re-queries each row of your table, assigns a random number ID and then delivers the results.  This takes a large […]



An interesting article about the types of things we are using ColdFusion for at Hamilton College: http://my.hamilton.edu/Spectator/021909/SciTech/LAMP.html  I don't really understand the title of the article, though.



I recently completed the beta version of CFjqAjax.  This is a library of custom tags that replicate the CFGRID, CFWINDOW, and CFTOOLTIP tags from ColdFusion 8.  The CF8 tags work, but I find YUI and Ext much harder to work with than jQuery, and the file size of the JavaScript libraries that CF8 includes is excessive.  So, […]



One of my colleagues recently mentioned to me that he was frustrated with CFGRID because after a grid row is selected, you can't trigger an action when it is clicked again.  Here's the solution I found.  First the grid code… <cfajaxproxy bind="javascript:todetail({shipments.id})" /><cfgrid query="sdQry" name="shipments" format="html" autowidth="false" selectonload="false" style="clear:both;"> <cfgridcolumn name="id" display="no" /><cfgridcolumn name="INVOSHIPDATEDISPLAY" header="Pickup Date" width="75" […]



The more I use the CF8 Ajax features, the more I like them.  CFTOOLTIP is a fairly simple tag, but you can do some fairly powerful things with it.   TIP #1 – Styling You can style a cftooltip to look like a pop-up window or Netflix-style pop-up.  Here's a small clip to put in your page […]



I've been neglecting my blog because I have been working on several large eCommerce projects over the last two months, but I found an issue that I think is worth asking the CF community about. With the new features in CF8, I find myself wanting to use cfform and cfinput more for binding and Ajax features, but […]



I gave a presentation titled "Introductionto Ajax Features in ColdFusion 8" at the Syracuse ColdFusion User Group meeting this week.   In the presentation, I covered the following. The basic layout elements that are used with Ajax Automatic Ajax – Things that ColdFusion 8 handles for you – without needing to program any JavaScript. Almost-Automatic Ajax – Things […]



Do you want to build an integrated ColdFusion interface to Gmail?  Using newbish's IMAP CFC client, it can be done.  It just needs a couple modifications to work with Gmail's SLL IMAP.   Here's how… 1. Enable IMAP in your Gmail account 2. Download the IMAP CFC from SourceForge.3. Make the following modifications to the imap.cfc On […]