Hi,
How do I pass state/callback via an async call ?
for example:
supoose I have a service JS function that calls an AJAX Method,
The callers of the JS want to get the response for the respective Calls
after some common processing.
something like:
function Service(callback,param) { //<-- this callback should be used
by Service_callback
AJAXServerSideNamespace.DoWhatEver(Service_callback);
}
function Service_callback(res) {
//Do some processing on res
callback(param,res); // <--- how can I pass the callback
to here?}
}
function Usage1(){
Service(Usage1_callback,p1)
}
function Usage1_callback(param,res) { // p1 would be passed here into
param
}
function Usage2(){
Service(Usage2_callback,p2)
}
function Usage2_callback(param,res) { // p2 would be passed here into
param
}
and so on....
any ideas about how I can implement this ?
can I pass a callback function that is bound to the state object ? and
then use "this" inside somehow ?
any tips are welcome ...
b.t.w. - what should I do to get the interface of this newsgroup to
always be in english ?
Thanks,
Eyal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---