Send extra data to Callback function

Discussion created by rumelk on Oct 14, 2013
Latest reply on Oct 17, 2013 by zj_zou
I�??m calling selectFeatures(query,selectionMethod?,callback?,errback?) method in a loop and I need to know the feature layer of each result. I call the same callback function for each call inside the loop.
I tried several ways but neither worked.

Followed this link as well:

What I want to do is to list the number of features returned from each feature server.

Please help�?�