Suppose there is a JavaScript page located at myaddress/service.js on a server. The code in this .js file looks something like:
nsBob = {
a: function(someParam) {...perform actions and return result},
b: function() {...perform actions and return result},
c: function() {...perform actions and return result}
};
Imagine you have an application in a different domain, and you want to utilize one of nsBob's functions, for example, nsBob.a(something).
How can you make a simple AJAX call specifically for this individual function to retrieve the result data from a different domain? This includes making the call with or without passing parameters. It would be really helpful if someone could provide a complete working example.
Many thanks!