I am using a function which takes a callback paramater to which im passing my own function. I'm however getting the error function expected
GpsGate.Server.MyService.getTracksByUser(groupName, user.username, getTracksByUser_callback());
function getTracksByUser_callback(result)
{
var responseData = '<response>';
result.tracks.foreach( //error on this line
function addTrack(track) {
responseData += '<track>';
//ommited
responseData += '</track>';
}
);
responseData += '</response>';
response.body = responseData;
}
looking at examples http://msdn.microsoft.com/en-us/library/ie/ff679980(v=vs.94).aspx im unsure why it is not working
results.tracks.foreachisn't a function. If it's supposed to be an array, it should be forEach