How can I return that values

M

Mariano

Then, I have this script:

function mainFunction(src, type) {
// ...
if(XMLHttpRequestObject) {
XMLHttpRequestObject.open(type, src, true);
XMLHttpRequestObject.onreadystatechange = function(){
if (XMLHttpRequestObject.readyState == 4 &&
XMLHttpRequestObject.status == 200) {
var xmlDocument = XMLHttpRequestObject.responseXML;
var returnValue = calling(); //<==FUNCT
}
}
XMLHttpRequestObject.send(null);
}

}

function calling() (see the //<==FUNCT marker), when executed, return
a boolean value. Now since this function, is never called directly,
but always from mainFunction() function [and through anonymouse
function], I need that mainFunction return at the end the same value
of calling() execution [returnValue]. How can I do It?
Thanks.
 

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,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top