| | #1 |
| Warrior Member Join Date: 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
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 |
| | |
| |
|
| Bookmarks |
| Tags |
| expected, foreach, function, javascript |
| |