Data returned by Ajax is in asynchronous manner and thats why you need
to use a callback function that gets executed once the data has been
returned!
Can you explain the rational as to why you dont want to create
postFunction ???
If you dont want to create a separate postfunction here is another
trick
function pleaseDoThis(x,y){
params = 'xPassed='+x+',yPassed='+y;
new mxAjax.Data({
parser: new mxAjax.CFArrayToJSKeyValueParser(),
executeOnLoad:true,
paramArgs: new mxAjax.Param(url,{param:params,
httpMethod:"get",
cffunction:"functionName"}),
postFunction: function(response) {
structResponse = JSON.parse(response);
passedBackVariable =
structResponse.returnFromCFC
return passedBackVariable;
}
});
}
Thanks
Arjun