[Javascript] Microsoft.XMLDOM onreadystatechange
Cutter (JavaScript List)
java.script at seacrets.com
Tue Oct 21 11:06:23 CDT 2003
Håkan,
The functions you are trying to write are JScript, not JavaScript.
JScript is a similar scripting language developed by Micro$oft for
working with IE, Windows, and various M$ web technologies. You can (or
could) find information on JScripting on the MSDN website.
Cutter
Håkan Magnusson wrote:
> This is my first posting to this list, so please have patience if I'm
> posting in the wrong direction.
>
> Consider the following code:
>
>
> function load_xml(sURL) {
> oMyTmpObj = new ActiveXObject('Microsoft.XMLDOM');
> oMyTmpObj.onreadystatechange = check_me;
> oMyTmpObj.load(sURL);
> }
>
> function check_me() {
> alert(this.readyState);
> }
>
>
> In the "check_me"-function, "this" is undefined. As we are loading
> multiple files in an asynchronous manner, we _need_ to keep track on
> wich XMLDOM-object that fires the onreadystatechange-event. We can't
> declare each and every XMLDOM-object in the document scope, as this
> would get out of hand fast.
>
> All examples I've found so far expects you to declare the
> XMLDOM-variable within the document scope, and then address this
> directly within the "check_me" equivalent function of that example.
>
> Any suggestions?
>
> Thankyou in advance,
> Håkan
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list