W3C home > Mailing lists > Public > public-xformsusers@w3.org > October 2017

Re: Link traversal failure with <load/>

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 31 Oct 2017 09:08:48 -0700
Message-ID: <CAAc0PEU8D8Fh1ns_u+qheYe-Pte6HkPXPBRU4s9yJHNmQeqTbw@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: XForms <public-xformsusers@w3.org>
It depends on how browsers do it. In this fairly old SO question [1],
somebody says:

> Not really possible, because when window.location = someURL is executed,
before the URL is even tested, your document is removed from the window.
You have no code remaining that could test if it worked.
> If the link is on the same origin, you may issue an XMLHttpRequest to
test if the page is reachable but there doesn't seem to be a way to test if
a page isn't requestable just due to cross origin request or because the
URL is wrong.
> For a general document, I don't know any way to test if a foreign origin
page is reachable (but it can be done for an image using the onload event
handler).

If it is indeed true that in the case of an external, not same-origin URL
the document is unloaded before the error is known, then there will be at
least some situations where nothing can be done. In some other cases, like
navigation within the same app or when accessing same-origin documents,
then more could be done.

-Erik

[1]
https://stackoverflow.com/questions/18404148/how-do-i-detect-if-window-location-failed

On Tue, Oct 31, 2017 at 7:28 AM, Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

> "The link indicated by the URI is traversed. If traversal fails, then an
> implementation-specific means of conveying the link traversal failure
> occurs."
>
> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_load_Element
>
> We may have discussed this before, but I've just hit it.
>
> Is there really nothing better that we can do than this?
>
> Clicking on a 'link' just does nothing. It would be really nice to have
> something like xforms-submit-error that at least tells you what's wrong...
>
> Steven
>
>
Received on Tuesday, 31 October 2017 16:09:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:48 UTC