Luis Majano Forums Notification: Post to Ajax

Title: RE: Ajax
Thread: Ajax
Forum: Discussions
Conference: ColdBox
User: ronanlucio

Luis,

I will try to do some tests on this using AjaxCFC. > I am now

incredible familiar with it, but I will > ask my friend Rob Gonda to take a look
at it and see what he can come up with.

That sounds great!
Thank you very
much for your help,

I saw an example with ModelGlue + ajaxCFC in the Rob´s
web site.
I think Coldbox can work with ajaxCFC as good as ModelGlue.
Perhaps it may need some ajustments, for example, for all I have understood,
ajaxCFC tries to execute a method passed as the event in the index.cfm.

Some
thing like:

[code]
<script type="text/javascript">
_ajaxConfig = {
'_cfscriptLocation':'/index.cfm', '_jsscriptFolder':'/views/js', 'debug':false
};
</script>

<script type="text/javascript">
function ajxInsertDepartment()
{
    var departmentName = DWRUtil.getValue("name");
DRWEngine._execute(_ajax._cfscriptLocation, null, "ehDepartment.doInsert",
departmentName, resultInsertDepartment);
}
</script>
[/code]

But I don´t
know if ajaxCFC would find this method (ehDepartment.doInsert) in the index.cfm.
In other words, I don´t know exactly what Coldbox returns in its index.cfm
execution.
I still need to make more tests

This example is in:
http://www.robgonda.com/blog/projects/ajaxcfc/examples/modelgluesamples/contactm
anagerAJAX/

Anyway, Rob certanly should have a good answer... :slight_smile:

I think
it would be nice the integration between Coldbox and ajaxCFC because we can do
many things in ajax/js that can avoid the creation of several view files,
especialy to avoid the creation of "part of files", files with just a HTML
block to replace the div´s contents.

Thank you,
Ronan

http://www.luismajano.com/forums/index.cfm?event=ehMessages.dspMessages&threadid=D45790C8-123F-6116-429115F42A272B60