Hi Guys/Gals
I have the following function:
function validateField(query) {
new Request.JSON({
onRequest : function() {
},
onSuccess : function(json){
return true;
},
data : query + '&validate=true',
url : base + 'ninjquiry.php'
}).send();
}
Now onSuccess is definitely firing because I can put a console.log in there and it works, however if I do the following somewhere else:
console.log(validateField(query));
I get "undefined". Why is this ?
Thanks for any help in advance
- Alex