TechnicallyChris.com

Technical and Personal Ramblings of a Bostonian
  • Home
  • About Chris
  • Donate
  • Contact Chris
Home > ColdFusion > My Jump Into AJAX

My Jump Into AJAX

September 12th, 2007
Goto comments Leave a comment

In the last few weeks I’ve been toying a bit with AJAX in some simple demo ColdFusion apps – pretty much just testing the waters. For anyone who, like me, has been slow to adopt AJAX, it’s time to jump in. I’ll try and post some of my little samples for anyone who might be thinking of trying it out sometime soon. In the mean time, here was my experience…

I decided to try the two most popular (in the usergroups and forums anyway) AJAX components out there: CFAjax and AjaxCFC. I read up a bit on both of them and there’s no one out there that’s really dismissing either – most people agreeing that they each have their pros and cons.

For no good reason whatsoever, I tried CFAjax first. It was very easy to install and the setup instructions were very straightforward. I got it all set, ran a test to make sure it was working, and life was good. I spent about an hour trying to get my own AJAX application to work on top of it, and I honestly couldn’t. Maybe I had missed a step, or maybe I was overlooking the obvious somewhere, but it just wasn’t happening. I decided to move on and try the next one, coming back to this if I needed to later.

AjaxCFC was a whole different story. Setup was a breeze (not that CFAjax wasn’t, they both were very easy), and I immediately got a new test application working – first try! After getting a pretty basic function working that would just accept text I entered, manipulate it in some way and pipe it back out, I wanted to test out some queries. This proved just a smidge more difficult. At no fault of AjaxCFC, I couldn’t figure out how to manipulate the query data once it was returned from the server. After reading up (it’s been a while!) on my javascript, I got it going.

For anyone who runs into this as their first snag, you reference your query as follows:

1
returnvar.column_name[row_number]

For example:

1
r.country_name[2]

Now obviously you can plop your variables in there and have a dynamic AJAX application running in no time! Kudos Rob Gonda for AjaxCFC.

If you enjoyed this article or it helped you in any way, I’d appreciate it if you’d post a comment below to let me know. All code examples are for demonstration only and should be used at your own risk. I cannot accept liability for unexpected results.

Chris ColdFusion AJAX, ColdFusion

Comments (0) Trackbacks (0) Leave a comment Trackback
  1. No comments yet.
  1. No trackbacks yet.
Subscribe to comments feed
How to Tell if CFSCHEDULE is Calling Your Page Create Multiple Web Sites Under Windows XP IIS
RSS feed
  • Google
  • Youdao
  • Xian Guo
  • Zhua Xia
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha

Sponsored By

Read my review of Mozy here.

Recent Posts

  • Just Bought the Google Nexus One
  • Seven Things I’ve Liked About Windows 7 in Seven Day
  • What’s Happened to Customer Service (Part 2)?
  • What’s Happened to Customer Service (Part 1)?
  • Capturing S.M.A.R.T. Hard Disk Data from WMI with AutoIt
  • Adjusting DCOM Settings via Script
  • How to Manually Call the Google Cache
  • RoboForm & RoboForm2Go Product Review
  • Updated PingCell Function for Excel
  • Creating Hyperlinks in Word and Excel Longer than 256 Characters

Categories

  • ColdFusion
  • Firefox
  • Google Nexus One
  • IIS
  • McAfee EE / SafeBoot
  • Microsoft Windows
  • Oracle
  • Random Code
  • Random Technology
  • Sports and Recreation
  • Subversion
  • The Untechnological

Archives

  • January 2010
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • October 2007
  • September 2007
  • August 2007
  • January 2007
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006

Meta

  • Register
  • Log in
PageRank
Top WordPress
Copyright © 2006-2010 TechnicallyChris.com
Theme by mg12. Valid XHTML 1.1 and CSS 3.