Retreiving values from

N

Noozer

I'm just starting to try out "Ajax" web programming and I've got a
question.AJAX is fairly straightforward. Javascript creates an XMLHttp
object and then uses that to generate a hidden webpage with your
results.What I'd like to know is, how can I retrieve multiple values from an
XMLHttp request?For example, if my request generated an SQL query that
returned a Name, Address and PhoneNumber, could I get those values directly
instead of parsing them out of the ResponseText?This is my current
handler:function showResult(str)
{
if (str.length > 0)
{
var url="getResult.asp?sid=" + Math.random() + "&q=" + str
xmlHttp=GetXmlHttpObject(stateChanged)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
}
else
{
document.getElementById("txtResult").innerHTML=""
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top