W3C home > Mailing lists > Public > public-webapi@w3.org > April 2008

Re: [XMLHttpRequest] Comment on the example in Section 1

From: Subbu Allamaraju <subbu.allamaraju@gmail.com>
Date: Thu, 17 Apr 2008 10:44:50 -0700
Cc: public-webapi@w3.org
Message-Id: <193FD146-7FA4-4936-AF20-02C37FC69DE2@gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>


On Apr 17, 2008, at 10:41 AM, Boris Zbarsky wrote:
> Subbu Allamaraju wrote:
>> Have you tried?
>
> Yes.  Have you?  Here, just to help you out:
>

Yes, indeed. It works with the specific example you tried below (using  
XHTML), but not for generic XML, which is what the draft is using.

> test.xhtml:
>
> <html xmlns="http://www.w3.org/1999/xhtml" id="one"/>
>
> test.html:
>
> <script>
> var x = new XMLHttpRequest();
> x.open("GET", "test.xhtml", false);
> x.send("");
> alert(x.responseXML.getElementById('one'));
> </script>
>
> But since you're apparently not willing to test yourself (the amount  
> of time it takes to write the test is smaller than the amount of  
> time it takes to send all these mails), I'll just let you know that  
> Gecko 1.8, Gecko 1.9, Safari 3.1, and Opera 9.25 all hand back the  
> HTMLElement from that getElementById call.

That's something :)

Subbu
Received on Thursday, 17 April 2008 17:45:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 17 April 2008 17:45:05 GMT