Hi,

with Ajax.NET Professional you can write this code:

function myClass() {
    this.propertyA = 1;
    this.propertyB = "Hello World";
}

myClass.prototype.doCallback = function(res) {
    this.propertyA = res.value;
}

myClass.prototype.doInvoke = function() {
    Namespace.Class.Method(this.propertyB, this.doCallback.bind(this));
}


To use this class you can write following code:

var x = new myClass();
x.doInvoke();


When the result is loaded from the server the method doCallback is
called an the result is set to the propertyB.

Does this help?

Regards,
Michael




On 4/28/06, arseniq <[EMAIL PROTECTED]> wrote:
>
> I am developing a javascript class with using prototype framework and
> also making async calls in this class..
>
> Inside the class it's own functions can be referred like this.someFunc
> as you know. When i make an async call from a func. inside the class,
> in the callback function i need to call one of my functions belongs to
> my class but "this" is referring to an array now. How can i solve this
> situation?
>
>
> >
>


--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to