I appreciate everyone falling over themselves to give the obligatory
"Use jQuery" response :), but I'm kind of surprised no one mentioned the
super simple method of doing this that is built right in to CF8 and 9.

Click on this link (CF8 docs):
http://livedocs.adobe.com/coldfusion/8/htmldocs/ajaxui_5.html
and scroll down to "Using the cfajaxproxy SetForm function".

There's a working code sample for you and everything.  Essentially, you
create a CFC on the server side and reference it with a cfajaxproxy tag.
 To borrow from Adobe's example, the magic happens in about 3 lines of
JavaScript code:

var auth = new AuthenticationSystem();
auth.setForm("loginForm");
auth.validateCredentials();

~Brad


-------- Original Message --------
Subject: AJAX Question
From: Matthew Allen <a.matthe...@yahoo.com>
Date: Fri, January 22, 2010 8:48 am
To: cf-talk <cf-talk@houseoffusion.com>


Can anyone please give me pointers or real life example of how to insert
simple form field values into a database using AJAX.

Many thanks.

Matt 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330035
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to