Easy Ajax : Part 2

In the first post of this series, we looked at a really basic AJAX example. We simply pulled the time and date into our page via an AJAX call.  In this post, we'll take things a step further by passing a variables in and using it in the output.

For this example, we'll take an input string and output it in reverse.

Here is a working sample:


[More]

Easy Ajax : Part 1

In this series of posts, I'm going to demonstrate how to get some basic AJAX going using Prototype along with ColdFusion - it's easier than you think.  Prototype is all you need to get some serious AJAX going. You can do it yourself and interact with the XmlHttpRequest object directly if you'd like, but Prototype abstracts all the hard stuff - like worrying about how each specific browser gets its AJAX magic going.

For this first example, we're going to keep it simple.  We'll just output the current time and date.  So here's what you need to do...

First, include the following snippet in the <head> section of your page to include the Prototype library:

<script type="text/javascript" src="prototype.js"></script>

[More]