Re: [Xsltforms-support] IE9 subforms access error
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2012-08-10 05:29:33
|
Hello Jeremy, Le 13/07/2012 23:50, Jeremy Frier a écrit : > The problem in IE9 was caused by having compatibility mode turned on. Unfortunately, this does not correct the problem in IE8. I'm not sure how to go about fixing the problem in the xsltforms.js as the issue appears to be with the appendChild method on a script element being generated in the XsltForms_load.prototype.run method for the show=embed. > > var scriptelt = XsltForms_browser.isXhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "script") : document.createElement("script"); > scriptelt.setAttribute("id", "xsltforms-subform-" + XsltForms_globals.nbsubforms + "-script"); > scriptelt.setAttribute("type", "text/javascript"); > var scripttxt = document.createTextNode(subjs); > scriptelt.appendChild(scripttxt); > > I've updated locally xsltforms.js to now be what's shown below and IE8 is working, looking forward to using subforms now: > var scriptelt = XsltForms_browser.isXhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "script") : document.createElement("script"); > scriptelt.setAttribute("id", "xsltforms-subform-" + XsltForms_globals.nbsubforms + "-script"); > scriptelt.setAttribute("type", "text/javascript"); > if (window.addEventListener) { > /* Firefox, Chrome, IE9 */ > scriptelt.appendChild(document.createTextNode(subjs)) > } else { > /* IE8 */ > scriptelt.text = subjs; > } > > If anybody sees an issue with this approach, please let me know as I'm really just trying to get to the point of testing performance to determine if we have to move in a new direction or whether subforms is our answer. > > I already had the same problem with IE<9 and the script embedded XForms feature and used the same approach. This will be included in the next commit. Thanks! -Alain |