Web Trenches

Story done by Hamilton College on our latest mobile Web project using both jQuery Mobile and CSS media queries: http://www.hamilton.edu/news/story/hamilton-offers-fast-access-with-new-mobile-friendly-app

I recently had to come up with a solution for Word-to-PDF file conversions on a server that was running Railo (UPDATE: Works on Lucee as well).  After much searching and combining of various articles that I read, I decided to put together a simple CFC to make this easier for others (and reusable for me).  This CFC will […]

After applying the 1.6 update to Mango Blog, my blog immediately stopped working.  Even after modifying some code to get around the error, all extensions were broken.  The answer was out there in the Mango forum, but it took me a while to find it.  I thought I'd spread the word for other Mango users. The problem's […]

This has probably been written about many times before, but it stumped me today, so I thought I would share in case it saves anyone else some time.  By default, ColdFusion does not store data as UTF-8 into SQL Server.  This is a problem for Chinese characters sets, as well as many others.  I struggled with this […]

All of the programming that comes with the Uploadify plug-in for jQuery is done in PHP.  I've converted the new checkScript feature to use ColdFusion instead. —— checkfileexists.cfm —– <cfset returnArray = arrayNew(1) /><cfloop list=”#form.fieldnames#” index=”i”>    <cfif i NEQ “folder” AND fileExists('#expandpath(form.folder)#\#form[i]#')>            <cfset arrayAppend(returnArray,form[i]) />    </cfif></cfloop><cfcontent reset =”true” /><cfoutput>#serializeJSON(returnArray)#</cfoutput><cfabort> ——- end checkfileexists.cfm —— The cfcontent […]

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, […]

A common question that many business managers and owners have is, “What technology should be used to build my Web site?”  Ask an expert Web developer, and the answer to the question will usually be whatever language the developer is an expert in.  If you ask a PHP programmer about ASP.NET, they will usually say that it […]

If you are having problems with FCKeditor and Firefox 3.6, take a look at Pete Freitag's solution.  http://www.petefreitag.com/item/737.cfm Thanks Pete!  I never thought we'd have to deal with a Y2K10 bug.

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 […]