D
Daz
Hi all.
I would like to take the onreadystatechange method, and make it
private. Please could someone tell me what I need to do? I am guessing
I'd need to somehow copy the constructor of the XMLHttpRequest object,
into the prototype of an empty object and perhaps edit it from there?
I would appreciate it if anyone could give me a quick example of how I
might achieve this.
In case anyone is wondering why I would like to do something like
this, the reason is quite simple.
For my needs, onreadystatechange should be made private, and it will
be overridden by a function called onrequestcomplete. As I don't need
to know the various stages of the communication with the server, I
only want it to be passed to the external function for processing once
it's complete. The onrequestcomplete method will also handle any
errors the server might throw.
Needless to say, that I am looking to create a custom object and not
actually override anything on the original object itself.
Many thanks in advance.
Daz.
I would like to take the onreadystatechange method, and make it
private. Please could someone tell me what I need to do? I am guessing
I'd need to somehow copy the constructor of the XMLHttpRequest object,
into the prototype of an empty object and perhaps edit it from there?
I would appreciate it if anyone could give me a quick example of how I
might achieve this.
In case anyone is wondering why I would like to do something like
this, the reason is quite simple.
For my needs, onreadystatechange should be made private, and it will
be overridden by a function called onrequestcomplete. As I don't need
to know the various stages of the communication with the server, I
only want it to be passed to the external function for processing once
it's complete. The onrequestcomplete method will also handle any
errors the server might throw.
Needless to say, that I am looking to create a custom object and not
actually override anything on the original object itself.
Many thanks in advance.
Daz.