[Xsltforms-support] Page-initialization crashes are not detected
Brought to you by:
alain-couthures
From: Kostis A. <ank...@gm...> - 2010-03-27 12:48:36
|
Hi, When for some reason the generated-from-XSL javascript-initialization code of the page fails, (such as when the definition of the init() function fails) no message gets displayed to the user. I really had trouble realising why my users reported "all ok" but "nothing worked!" on IE. A more adequate response would be to issue an error mesage. I would suggest the generated page-code to become something along the lines drawn above: <!-- the old script element --> <script type="text/javascript"> function initImpl() { // The old init() renamed. try { .../* XFDefinition genrated by XSL HERE. */ } catch (e) { ... } <!-- A new script element --> </script> <script type="text/javascript"> // The new init() to be invoked by body.onLoad. function init() { try { initImpl(); } catch(e) { alert("Generated XForms-Init script crashed due to: \n"+e); } </script> Regards, Kostis Anagnostopoulos. |