Pass Extra Parameters to JavaScript Callback Function
- by BRADINO
Here is a simple example of a function that takes a callback function as a parameter.
query.send(handleQueryResponse);
function handleQueryResponse(response){
alert('Processing...');
}
If you wanted to pass extra variables to the callback function, you can do it like this.
var param1 = 'something';
var param2 ='something…