[Javascript] Microsoft.XMLDOM onreadystatechange

Håkan Magnusson hakan at backbase.com
Tue Oct 21 11:21:14 CDT 2003


Hi Chris!

I think understand your solution, but we've tried that.
You can't add properties to an XMLDOM-ActiveXObject.

oMyTmpObj = new ActiveXObject('Microsoft.XMLDOM');
oMyTmpObj.bIsLoaded = false;

Doesn't work.

Or am I misunderstanding?

Håkan


Chris Tifer wrote:

> Perhaps you should create an object and then instantiate new instances of
> these objects. Then make check_me a method on that object. That should clear
> up your problem and you will be able to use this - as far as I can tell from
> what you're trying to do.
> 
> Chris Tifer
> 
> 
> ----- Original Message ----- 
> From: "Cutter (JavaScript List)" <java.script at seacrets.com>
> To: "[JavaScript List]" <javascript at LaTech.edu>
> Sent: Tuesday, October 21, 2003 12:06 PM
> Subject: Re: [Javascript] Microsoft.XMLDOM onreadystatechange
> 
> 
> 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
> 
> 
> 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> .
> 




More information about the Javascript mailing list