Passing a return value
<p>Please help, I have been looking at this all day and I know there must be a simple fix!</p>

<p>How do I pass results back to textService so that I can make a call such as 
textResult = textService(text to pass in);</p>

<p>I don't want to use a global variable if I can avoid it.
This is the code</p>

<pre><code>function textService(text){
req.open("GET", "http://....?text="+text, true);
req.onload = showResults;
req.send(null);
}

function showResults() {
results = req.responseXML.getElementsByTagName("Result");
}
</code></pre>

<p>Thank you in advance</p>
