AjaxCFC fastSerialize example
Due to popular request, I added an example showing how to easily submit an entire form through Ajax with the fastSerialize jQuery plugin.
All you require to do is to include this plugin:
and use it to send them form:
the send() function looks like this:
simple huh?
Again, I updated the SVN repo and project download files. Enjoy.
All you require to do is to include this plugin:
$.AjaxCFC({require:'json,dDumper,blockUI,jquery.fastSerialize'});
and use it to send them form:
onSubmit="return send( $(this).fastSerialize() );"
the send() function looks like this:
function send(frmData) {
$.AjaxCFC({
url: "echoTest.cfc",
method: "echo",
data: frmData,
success: function(data) {
sDumper(data);
}
});
return false;
};
$.AjaxCFC({
url: "echoTest.cfc",
method: "echo",
data: frmData,
success: function(data) {
sDumper(data);
}
});
return false;
};
simple huh?
Again, I updated the SVN repo and project download files. Enjoy.
TrackBacks
There are no trackbacks for this entry.
Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?8E0A5A06-3048-7431-E4D6E4E6D36E5AA5
http://www.robgonda.com/blog/trackback.cfm?8E0A5A06-3048-7431-E4D6E4E6D36E5AA5









Sorry if I'm a little late on AjaxCFC, but how is this different to just doing a generic jquery .post?
$.post("echoText.cfc?method=echo", function(data){
alert("Data Loaded: " + data);
});
BTW, the $.post() function was deprecated with jQuery 1.1 in favor for .ajax().
Cheers.
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.AjaxCFC.js" type="text/javascript"></script>
but not this
<script src='../support/ajaxcfc/js/jquery.js' type='text/javascript'></script>
<script src='../support/ajaxcfc/js/jquery.AjaxCFC.js' type='text/javascript'></script>
ajax.cfc is in the support folder and works fine
It just seems that moving files around breaks things. Is this is why you put the cfcs in every directory? This isn't an include issue, the files are being included. Thanks.
Can you specify where the code breaks and what error you're getting?
<code>
$.AjaxCFCHelper.setBlockUI(true);
$.blockUI ( {backgroundColor: '#ccc' });
</code>
?
Thanks