Ok...I'm a n00b to the Microsoft was of doing AJAX - I've been using Prototype.
I ran the tutorial video for the client callback, and had that working correctly.
Unfortunately, my real-world scenario is returning an object which from what I've been reading is neatly serialized by the Microsoft AJAX stuff into a JSON string/object/"thing".
This is where my brain explodes.
I don't know how to get the information out of this ethereal "thing" that's being returned by my web service. I can see the "stuff" when I look at it with Tamper Data, but don't know how to get at it.
Here's my client-side call:
function GetLicenseeDetails()
{
var retVal = eval(GetLicenseeInfo.LicenseeInfo(document.getElementById('<%= ddlLicensees.ClientID %>').value, OnComplete, OnTimeout, OnError));
alert(retVal);
return(true);
}
The alert I've thrown in there just reports 'undefined'.
If anybody's got a good place they can point me to learn what I'm doing wrong, I'd appreciate it very much. I'm hoping it's something simple...
Thanks in advance,
Ric
Hi
The calls are asynchronous which means that the reqyurn value is not immediately available to you. You will get the return object only in the OnComplete method.
function OnComplete(retVal) {
alert(retVal);
}
No comments:
Post a Comment