All,
Currently the xforms.js fails (in IE) when using the standard browser
implementation for
window.onbeforeunload = somefunction
The following
improvement @ line 2900 of xforms.js will catch the error
// TFX CODE START // Replaced window.location.href = resource; with // Catch the failure in IE try{ // Change the resource window.location.href = resource; }catch (ex) {} //TFX CODE END Simple, but effective. Firefox doesn't throw and error, so no changes needed. The only issue then is that the loading box shows all the time Adding @xxforms:show-progress="false" to all the xforms:load you have in the page will solve this Alex/Erik Any chance of getting this in xforms js? Is there a global show-progress property that could be set on a page/application basis? Thanks Ryan Ryan
Puddephatt -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 12/19/06, Ryan Puddephatt <[hidden email]> wrote:
> Currently the xforms.js fails (in IE) when using the standard browser implementation for > > window.onbeforeunload = somefunction > > The following improvement @ line 2900 of xforms.js will catch the error Ryan, Why does it fail? What is the error? Do you have some code to reproduce this? > Any chance of getting this in xforms js? Is there a global show-progress > property that could be set on a page/application basis? You would like to have a property to completely disable the "Loading..." indicator? Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alex,
See attached, When clicking the trigger "Move off the page" it uses xforms:load to send you to a url of / The beforeunload event kicks in a shows a message, where clicking OK continues to move you off the page and Cancel stops you (also throwing an Unexpected error in IE) All solutions I've found/come up with involve the try/catch, let me know if you have a better solution Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: [hidden email] [mailto:[hidden email]] On Behalf >Of Alessandro Vernet >Sent: 21 December 2006 01:12 >To: [hidden email] >Subject: Re: [ops-users] xforms:load client side improvement > >On 12/19/06, Ryan Puddephatt <[hidden email]> wrote: >> Currently the xforms.js fails (in IE) when using the standard >> browser implementation for >> >> window.onbeforeunload = somefunction >> >> The following improvement @ line 2900 of xforms.js will catch the >> error > >Ryan, > >Why does it fail? What is the error? Do you have some code to >reproduce this? > >> Any chance of getting this in xforms js? Is there a global >> show-progress property that could be set on a >page/application basis? > >You would like to have a property to completely disable the >"Loading..." indicator? > >Alex >-- >Blog (XML, Web apps, Open Source): >http://www.orbeon.com/blog/ > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws unload.xhtml (1K) Download Attachment |
Administrator
|
Hi Ryan,
OK, I can run the example you attached. On Firefox, the Loading indicator does not go away if you choose "Cancel" in the dialog. But let's focus for now on the IE issue. With the latest code, we catch all the exceptions that can happen in handleResponse(). And when there is an error we display something like "Unexpected response received from server" (as we expect this to be a problem related to running the response received from the XForms server). So with your example, I get an error at the top of the page "Error while processing response:". As you have seen, the exception is thrown when xforms.js does "window.location.href = resource". But the error that is thrown is strange. It does not have a message or a description like the other errors I have seen so far. So I modified xforms.js to only display that message at the top of the page with the error message if the error comes with a message. If there is no message in the exception, we just ignore the exception. On Firefox/Safari/Opera it stills get logged to the console. You'll let me know if this works for you as well. Here is the corresponding bug: http://forge.objectweb.org/tracker/index.php?func=detail&aid=306530&group_id=168&atid=350207 Alex On 12/21/06, Ryan Puddephatt <[hidden email]> wrote: > Alex, > See attached, > > When clicking the trigger "Move off the page" it uses xforms:load to send > you to a url of / > > The beforeunload event kicks in a shows a message, where clicking OK > continues to move you off the page and Cancel stops you (also throwing an > Unexpected error in IE) > > All solutions I've found/come up with involve the try/catch, let me know if > you have a better solution > > Ryan > > Ryan Puddephatt > Software Engineer > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > > > > >-----Original Message----- > >From: [hidden email] [mailto:[hidden email]] On Behalf > >Of Alessandro Vernet > >Sent: 21 December 2006 01:12 > >To: [hidden email] > >Subject: Re: [ops-users] xforms:load client side improvement > > > >On 12/19/06, Ryan Puddephatt <[hidden email]> wrote: > >> Currently the xforms.js fails (in IE) when using the standard > >> browser implementation for > >> > >> window.onbeforeunload = somefunction > >> > >> The following improvement @ line 2900 of xforms.js will catch the > >> error > > > >Ryan, > > > >Why does it fail? What is the error? Do you have some code to > >reproduce this? > > > >> Any chance of getting this in xforms js? Is there a global > >> show-progress property that could be set on a > >page/application basis? > > > >You would like to have a property to completely disable the > >"Loading..." indicator? > > > >Alex > >-- > >Blog (XML, Web apps, Open Source): > >http://www.orbeon.com/blog/ > > > > > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
On 12/21/06, Alessandro Vernet <[hidden email]> wrote:
> OK, I can run the example you attached. On Firefox, the Loading > indicator does not go away if you choose "Cancel" in the dialog. The question with Firefox is: can we somehow know that the user responded "Cancel" to the prompt, so we can hide the "Loading" indicator? Alternatively, can we know if another page is being loaded? If we can, display the "Loading", and then check every second if another page is still being loaded. If not (user pressed escape, chose Cancel in the case there is a dialog, ...), we remove the "Loading" indicator. It looks like this scheme could be fairly robust. Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alex,
I don't think there is anyway to know the result of the confirm, other than the fact your still on the page. One way I got round it was to use xxforms:show-progress="false" on all my xforms:load, but I guess the scheme you have come up with work better. Thanks Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: [hidden email] [mailto:[hidden email]] On Behalf >Of Alessandro Vernet >Sent: 22 December 2006 01:55 >To: [hidden email] >Subject: Re: [ops-users] xforms:load client side improvement > >On 12/21/06, Alessandro Vernet <[hidden email]> wrote: >> OK, I can run the example you attached. On Firefox, the Loading >> indicator does not go away if you choose "Cancel" in the dialog. > >The question with Firefox is: can we somehow know that the >user responded "Cancel" to the prompt, so we can hide the "Loading" >indicator? > >Alternatively, can we know if another page is being loaded? If >we can, display the "Loading", and then check every second if >another page is still being loaded. If not (user pressed >escape, chose Cancel in the case there is a dialog, ...), we >remove the "Loading" indicator. It looks like this scheme >could be fairly robust. > >Alex >-- >Blog (XML, Web apps, Open Source): >http://www.orbeon.com/blog/ > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 12/22/06, Ryan Puddephatt <[hidden email]> wrote:
> I don't think there is anyway to know the result of the confirm, > other than the fact your still on the page. One way I got round it was to > use xxforms:show-progress="false" on all my xforms:load, but I guess the > scheme you have come up with work better. On the condition that you can know programmatically if at a given point in time another page is loading (i.e. if the wheel is spinning). If someone already knows the answer, please let me know! Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |