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.
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.
$.get(
"http://xyz.com/webservice.pl",
{ q : "google" },
function(data) {
alert(data); // "google.com"
}
);