My function 'Test' call my Function 'Toto' and then after i have no control, my 'Test' function continue running, so my var MyResult is always null in my 'Test' method.
I would like to wait for the result of OnSucceedd to continue running my 'Test' function, so after the call to 'Toto' i have my var 'MyResult' set by the result of my OnSucceedd.
Here is my code :
var MyResult = null;
if(MyResult == true)
PageMethods.FindRequesterNameMatch(1, 2, onSucceeded, onFailed);
function onSucceeded(result, userContext, methodName)
MatchExist = result;
function onFailed(error, userContext, methodName)
MatchExist = false;