This content has been marked as final. Show 2 replies
First of all, it's not a stupid question.
We have a Batch Payment screen where an Insurance Agent can enter payments for up to 10 policies. As the agent enters a policy number, the system verifies that the agent can access the policy and if so, what is its current status and amounts due.
A fast typist can tab from row to row entering policy numbers faster than the system can turn around policy information. If we couldn't tie the request and response together correctly, we could potentially display the wrong payment amounts for any number of policies.
CallingScriptA will not get CallingScriptB's info because neither of them will touch the returned data. They will each have their own return function or will both call the same one. The order in which the data is returned can be an issue. The return data from B may show up before the return data from A. You just have to tell the response function how to handle the data.
In the case of our batch screen, I send along the row index with each request. I'm only using one Request function and one Response function, but the Response function knows where to display or populate data due to the index value. So its possible for multiple calls to a single method in a CFC to never step on each other.
Check out Rob Gonda's AjaxCFC project for some examples and more info.
cf_menace has covered off the client side but you can still get an overlap if you have not varred your local variables in your cfc methods.