Prototype Ajax.Request: how can i return responseXML to main function

A

alex.david

Hi,

in tutorials you find this code sample:
Code:
var myMap;
....
var url = "my_xml.xml";
var myAjax = new Ajax.Request(
url,
{
method: 'get',
onComplete: showResponse
});

// here i need something like:
// response = someObject.responseXML;
// so i can do this:
// myMap.createSomeMarkersWith(response);
....

function showResponse(request){
doSomethingwith(request.responseXML);
}

How can I use the responseXML in the "calling function"?
Reason is, I don't want to pass all the vars through the functions (and
I don't know how, anyway).
myAjax doesn't seem to have a responseXML or anything helpful at all.

Thanks in advance
Alex
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top