From: VK on
On Apr 24, 10:40 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> Whereas if load is used, only one ActiveX object is needed.

For IE even more simple way could be by using XML Data Islands and
overloading <script> element:
http://msdn.microsoft.com/en-us/library/ms766512(VS.85).aspx

"A good first place to start for determining recommendation for file
protocol would be to write a test suite and run existing
implementations
through it to see how they behave."

That is a great idea - strange it was not done yet and
http://www.jibbering.com/faq/#ajaxRef is dead silent about this very
common XHR use.

From: VK on
On Apr 24, 10:40 am, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> Should XMLHttpRequest use "file:///" or "file://" or "[drive]:\"? Or is
> it limited to relative paths? If so, what is the file separator? Is the
> browser expected to map "/" to the separator for that OS? Or should the
> code not expect that "/" gets mapped to "\" or ":" (or (hopefully
> not)"." or ">")? What about navigating to parent directories?

This matter is not as complex as being put. XHR operates over HTTP
interface and doesn't have access to local file system-level
interfaces. This way:
1) No, absolute path cannot be used in any form, neither in system-
dependent nor in browser-dependent nor in some universal one.
2) For relative path the regular HTML syntax must be used with '..'
for directory up and '/' for directory down.
'.' for root is not supported for the reason see point 1)
From: Thomas 'PointedEars' Lahn on
Garrett Smith wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Garrett Smith wrote:
>>> You're attemtping to use XMLHttpRequest for something it was not
>>> designed for. XMLHttpRequest is in Working Draft status, and is
>>> specified therein for http and https only[1].
>> Utter nonsense. When will you ever learn? The fact that a *draft*
>> specifies something has absolutely no intrinsic meaning at all. Which is
>> emphasized by the mere fact that XMLHttpRequest works for non-http and
>> non- https URLs outside of MSHTML, i.e. in the majority of
>> implementations, where some of them support considerable portions of the
>> draft.
>
> The fact that I wrote that: "XMLHttpRequest is in Working Draft status"
> indicates that it is a *draft*. You called that "utter nonsense", then
> stated that it is a draft and asked me when I will ever learn. Well I
> already knew that when I wrote it. It sounds like you are being
> ridiculous and and self contradictory.

No, you are. You are referring to a draft as the justification for an
implementation when that implementation has nothing to do with the draft,
and it is not appropriate to refer to a Working Draft as other than work
in progress. Apparently you'll never learn.

> [snip more nonsense]
>> MSHTML 8 in IE 8 supports but one feature of HTML 5 as specified in the
>> draft, and it is not XMLHttpRequest.¹ It is illogical to conclude that
>> XMLHttpRequest works so in MSHTML because it *might* become so in HTML 5.
>>
>> ¹ <http://blogs.msdn.com/giorgio/archive/2009/11/29/ie8-and-html-5.aspx>
>>
> Is there a point in linking to that blog?

Yes. If you could read ...

> [...]
>>> Example:
>>>
>>> <script type="text/javascript">
>>> var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
>>
>> var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
>>
>>> xmlDoc.async = false;
>>> xmlDoc.load("items.xml");
>>
>> xmlDoc.loadXML(xhr.responseText);
>
> That would require creating two ActiveX objects; one for the request and
> one for the parsing of the xhr responseText into a document.

Yes.

> Whereas if load is used, only one ActiveX object is needed.
> [...]

But the approach that uses two objects when necessary does not require a
complete rewrite for the version that also works with the local filesystem,
and it would not require those additional permissions you have talked about.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
From: Garrett Smith on
Thomas 'PointedEars' Lahn wrote:
> Garrett Smith wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> Garrett Smith wrote:
>>>> You're attemtping to use XMLHttpRequest for something it was not
>>>> designed for. XMLHttpRequest is in Working Draft status, and is
>>>> specified therein for http and https only[1].
>>> Utter nonsense. When will you ever learn? The fact that a *draft*
>>> specifies something has absolutely no intrinsic meaning at all. Which is
>>> emphasized by the mere fact that XMLHttpRequest works for non-http and
>>> non- https URLs outside of MSHTML, i.e. in the majority of
>>> implementations, where some of them support considerable portions of the
>>> draft.
>> The fact that I wrote that: "XMLHttpRequest is in Working Draft status"
>> indicates that it is a *draft*. You called that "utter nonsense", then
>> stated that it is a draft and asked me when I will ever learn. Well I
>> already knew that when I wrote it. It sounds like you are being
>> ridiculous and and self contradictory.
>
> No, you are. You are referring to a draft as the justification for an
> implementation when that implementation has nothing to do with the draft,
> and it is not appropriate to refer to a Working Draft as other than work
> in progress. Apparently you'll never learn.
>

False, presumptuous bullshit.

I referred to a w3c working draft. That much is true.

You wrote that I did so in "justification for an implementation."

That is false. I did not mention an implementation.

You stated that I did so "when the implementation has nothing to with
the draft.".

That is false. I did not mention an implementation.
I wrote:

| You're attemtping to use XMLHttpRequest for something it was not
| designed for.

[...]
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Thomas 'PointedEars' Lahn on
Garrett Smith wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Garrett Smith wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> Garrett Smith wrote:
>>>>> You're attemtping to use XMLHttpRequest for something it was not
>>>>> designed for. XMLHttpRequest is in Working Draft status, and is
>>>>> specified therein for http and https only[1].
>>>> Utter nonsense. When will you ever learn? The fact that a *draft*
>>>> specifies something has absolutely no intrinsic meaning at all. Which
>>>> is emphasized by the mere fact that XMLHttpRequest works for non-http
>>>> and non- https URLs outside of MSHTML, i.e. in the majority of
>>>> implementations, where some of them support considerable portions of
>>>> the draft.
>>> The fact that I wrote that: "XMLHttpRequest is in Working Draft status"
>>> indicates that it is a *draft*. You called that "utter nonsense", then
>>> stated that it is a draft and asked me when I will ever learn. Well I
>>> already knew that when I wrote it. It sounds like you are being
>>> ridiculous and and self contradictory.
>>
>> No, you are. You are referring to a draft as the justification for an
>> implementation when that implementation has nothing to do with the draft,
>> and it is not appropriate to refer to a Working Draft as other than work
>> in progress. Apparently you'll never learn.
>
> False, presumptuous bullshit.

There is no presumption, stupid. You *wrote* it.

> I referred to a w3c working draft. That much is true.
>
> You wrote that I did so in "justification for an implementation."
>
> That is false. I did not mention an implementation.

Yes, you did: "IE", i.e. the MSXML.

> You stated that I did so "when the implementation has nothing to with
> the draft.".
>
> That is false. I did not mention an implementation.

Yes, you did.

> I wrote:
>
> | You're attemtping to use XMLHttpRequest for something it was not
> | designed for.

And going on with saying that the draft would specify the behavior that "IE"
exhibits. How is that *not* justifying the implementation with the draft?


PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7(a)news.demon.co.uk> (2004)
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: Quicktime and innerHTML
Next: option & textnode