![]() |
Javascript Foreach Function Expected 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 forEach Method (Array) (JavaScript) im unsure why it is not working |
| All times are GMT -6. The time now is 07:55 AM. |