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.

Thanks,
Jeremy

From: Alain Couthures [mailto:[email protected]] 
Sent: Friday, July 13, 2012 1:12 PM
To: Jeremy Frier
Cc: [email protected]
Subject: Re: [Xsltforms-support] IE9 subforms access error

Hello Jeremy,
I am trying to upgrade our beta3 forms to 1.0 RC and implement subforms on one 
of our existing forms.  In firefox, this is working without a problem.  The 
sample writers.xml works fine in both firefox and IE9.  The difference between 
our application and the writers sample is that we are bundling our forms 
through a tomcat server via a servlet that does some preprocessing of the xml.  
In the end, the xml that is passed to xsltforms is essentially the same. The 
big difference is in our xf:load which is:
 
<xf:load show="embed" targetid="generalSubForm" 
resource="FormLaunch?form=GeneralForm"/>
 
In debugging our webapp, the resource reference to the FormLaunch servlet works 
as expected.  In IE9, the server never receives the request.
 
In IE9, the profiler reports the following trace:
19262 -> Load FormLaunch?form=GeneralForm
48 -> Unexpected call to method or property access.
4 -> Dispatching event xforms-link-exception on <DIV class=" xforms-group" 
id="generalSubForm"/>
309 -> insert bftr_expce in bftrs_expcs at 0 - Data
0 -> Dispatching event xforms-insert on <SPAN class="xforms-instance" 
id="main"/>
1 -> insert loc_origin in locations at 0 - Data
0 -> Dispatching event xforms-insert on <SPAN class="xforms-instance" 
id="main"/>
 
  I went ahead and pulled in the writers.xml and replaced all of our form and 
subform with the writers.xml and the books.xml and experienced the same method 
or property access error using with the servlet resource reference.
 
I'm unclear as to where the unexpected call to method or property access is 
happening in the xsltforms.js, will continue to look, but wonder if somebody 
can point me in the right direction.
The IE9 debugger can help you to precisely locate this unexpected call (you 
should first set a breakpoint at line #4173).

Thank you for your feedbacks!

-Alain

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to