SAJAX ColdFusion POST Request Method
I’ve been working on a project of late using hefty portions of AJAX. Given that much of the scripting environment at Notre Dame is ColdFusion, I have been making good use of SAJAX.
Sajax is an open source tool to make programming websites using the Ajax framework — also known as XMLHTTPRequest or remote scripting — as easy as possible. Sajax makes it easy to call PHP, Perl or Python functions from your webpages via JavaScript without performing a browser refresh. The toolkit does 99% of the work for you so you have no excuse to not use it.
The current 0.10 version of the toolkit includes scripts for most web languages (ASP/ColdFusion/Io/Lua/Perl/PHP/Python/Ruby), and I have been very pleased with how easy it is to use. If you’re looking to get started in AJAX, this is a good place to start.
My only issue was that the current ColdFusion script, which was originally ported by Eric Moritz, was limited to passing all variables via GET (a.k.a. passing them through the URI). As far as I am aware, this was the case for the original PHP file that was used to port the ColdFusion script, so this lack of POST is no fault of Eric’s. However, on the latest release of SAJAX, the PHP script included the option to allow POST requests as well as GET. The current application I’m working on required the use of this POST method, so I ported the changes to the PHP code on top of Eric’s ColdFusion script. Many thanks to Eric for his original translation of this code.
Post and Author Info.
Published June 03, 2005 by:
Commenting is currently off for this post.
So far there are 8 comments.

can we stop calling it ajax yet?
June 3rd, 2005
Very cool indeed. I’ve been using SAJAX for PHP on an upcoming project. It really made the whole process of using Ajax fairly transparent. I’d be interested to see what you’re working on.
June 3rd, 2005
How does AJAX related development work with accessability? sureley live update of data is only feasable if you have majority use of sight?
Mark
June 4th, 2005
xmlHttpRequest, if done correctly and targetted for all the right browsers, will run on win ie5+, any version of a mozilla browser, and opera 7.4+ you’ll have to do some extra tweaking with opera however and IE you need to use the activeX equiv. it’s really tough to make something fail/safe with xhr mainly because…either the browser supports it, or not. I suppose you could always run a quick function that checks for the xmlHttpRequest object, and if not…do real _POSTS and _GETS…which would envolve another layer of logic…and of course, wouldn’t be as sexy.
June 4th, 2005
Oh, that’s awesome that you’ve worked on the cfmx sajax code. My first release of sajax_cfmx was modeled after version 0.9 of sajax. I added POST to the code after they released 0.10. Currently the my code is living at http://cfopen.org/projects/sajaxcfmx/, If you want to become a developer for the code, I’ll add you to the project team and you can check out the code from cvs and mess with it.
Thanks for making me famous :)
June 6th, 2005
For accessibility concerns, you can use AJaX simply as a way to enhance a user’s experience that does not have accessibility issues, yet provide complete (though unenhanced) functionality for those that do. In large applications, you will probably need to have two versions (plain HTML and AJaX driven), like GMail does.
July 29th, 2005
Has anyone gotten this working? I keep getting error after error.
Error casting an object of type java.lang.Integer to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed. java.lang.Integer
August 30th, 2005