pbd22 schrieb:
> There HAS to be a way to do this. Could somebody please explain this?
Yes, the Examples.
> clientMethod_callback(res) {
>
> //code to get database data
>
> return [val1, val1]; //so, at this point, 2 values are returned
>
> }
>
> clientMethod() {
>
> var fromServer = namespace.class.serverMethod(clientMethod_callback);
>
> return fromServer // the 2 values are lost and not returned here. can
> somebody
> // that knows what they are doing explain to
> me how to keep
> // returning the 2 values above so the can be
> called on the client?
>
> }
>
> callingMethod() {
>
> var arr1 = clientMethod()[1]; // alerting this gets 'undefined'
> var arr2 = clientMethod()[2]; // alerting this gets 'undefined'
>
> }
>
> This would be a great help.
You should use Async Methods... and take a look at the Samples.
var res = clienthMethod();
if (res != null)
{
var arr1 = res.value[0];
var arr2 = res.value[1];
}
--
Freundliche Grüße
Albert Weinert
http://der-albert.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---