[Javascript] Microsoft.XMLDOM onreadystatechange
Håkan Magnusson
hakan at backbase.com
Tue Oct 21 11:17:59 CDT 2003
Thanks Cutter, but according to several testcases over the last few
months, this is JavaScript. :-)
It actually works all the way, the only thing that doesn't work is the
"this", or more specifik, finding the XMLDOM-object that fires the
onreadystatechange-event. We were actually using the
Microsoft.XMLHTTP-ActiveXObject at first, and tried the XMLDOM-object to
see if it worked better.
But the loading, parsing and displaying of XML-documents work fine in
IE5.0+, and it's JavaScript.
Håkan
Cutter (JavaScript List) wrote:
> 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
>
> .
>
More information about the Javascript
mailing list