I'd start with the jQuery docs for making AJAX requests. While their examples likely reference PHP or other language for the server-side stuff, that can easily be done with ColdFusion instead. You can use either a .cfm page to provide the response, but it's usually a little easier to do it via a component (.cfc) with a "remote" function (that way you can return only the JSON or XML data you want to and not any extraneous HTML "noise"). Here is some documentation on writing components, and there is a section about invoking methods (functions) from a URL or FORM (which is essentially what AJAX requests are doing).
There can be a lot more to it - security and authentication issues need to be considered - but that should get you started.
1 person found this helpful
Short answers: Yes. There are various ways to accomplish the task. I prefer not to use the CFC method as Carl referenced just because I like knowing and controlling every factor - I'm kind of OCD about stuff like this. The CFC method hides a lot of the lower level stuff but to me this makes it harder to diagnose if and when problems occur once your code has contact with the enemy, er, users.
Again as Carl mentioned, security and authentication must be considered. I go even further, security should be the core and everything else would be considered "features". But then again, I mostly deal with payments so I tend to be a little paranoid.