I'm calling PageMethod "SameMethod" from javascript method "caller" so that I can get some values from DB. After I get values, control is continuing in "onSuccess" method. Problem is that I need to use some variable values ("importantValue") from javascript method "caller" in "onSuccess" method.
function caller(){ var importantValue = 1984; PageMethod.SomeMethod(param1,..., onSuccess, onFailure) }
onSuccess method should be something like this:
function onSuccess(pageMethodReturnValue, importantValue ){ }
Is it possible and, if it is, how to pass multiple parameters (besides return values of page method) to "onSuccess" method of PageMethod?
Thanks for help