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.
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.