Say I have a web service http://www.example.com/webservice.pl?q=google which returns text ‘google.com’. I need to call this web service (http://www.example.com/webservice.pl) from a JavaScript module with a parameter (q=google) and then use the return value (‘google.com’) to do further processing.
What’s the simplest way to do this? I am a total JavaScript newbie, so any help is much appreciated.
Take a look at one of the many javascript libraries out there. I’d recommend jQuery, personally. Aside from all the fancy UI stuff they can do, it has really good cross-browser AJAX libraries.