Two of my XForms rely upon the file upload work around detailed in XRX/XSLTForms and eXist Wikibook:
http://en.wikibooks.org/wiki/XRX/XSLTForms_and_eXist#Upload_file_with_XSLTForms
Since moving to XSLTForms Beta 3 I have noticed that submitting the form, without selecting a document to upload, causes the two following error messages (see end of e-mail) to appear. I'm using Firefox 3.6.10 on Windows 7.
The sending of the instance data works OK but something, elsewhere, is causing a problem. Please also note that I am sending a 204 (No Content) response from the server because I don't want the page to reload as a result of the upload. If I send 200 (Success) then I get no error messages I guess because the form is no longer there to complain about something.
Currently I do two sequential submits, if the first succeeds the then upload is sent. Ideally I'd like to be able to set a flag in an instance in the data model so that the upload will be sent if I have selected a resource to upload and not otherwise. I've tried a quick test using:
document.getInstanceDocument('instance').hasChildChildNodes()
to see if I can get some JavaScript working , but I got nothing back. I guess I'm not calling that method correctly.
Anyone have any hints as to either the error message and/or using the getInstanceDocument method.
Regards
Philip Fennell
Consultant
MarkLogic Corporation
One Kingdom Street
Paddington Central
London W2 6BD
United Kingdom
Mobile: +44 (0) 7824 830 866
Tel: +44 (0) 203 402 3619
email Phi...@ma...<mailto:Fir...@ma...>
web www.marklogic.com<http://www.marklogic.com/>
XSLTForms Exception
--------------------------
Error initializing :
()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2894
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387
([object HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126
forEach([object Array],"execute",[object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126
run([object Object],"update-instance",[object Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:161
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172
([object HTMLSpanElement],"xforms-submit-done",null,true,false,(function () {}),[object Object])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282
()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2755
()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2891
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387
([object HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126
forEach([object Array],"execute",[object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3136
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126
run([object Object],"xf-trigger-4",[object Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:258
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172
([object HTMLSpanElement],"DOMActivate")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282
([object HTMLButtonElement])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:5495
([object MouseEvent])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1583
ReferenceError
DebugConsole is not defined
XSLTForms Exception
--------------------------
Error initializing :
()@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:2894
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7387
([object HTMLSpanElement],"xforms-submit")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7285
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3280
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3141
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126
forEach([object Array],"execute",[object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1183
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3174
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3136
([object HTMLSpanElement],[object Element],[object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:3126
run([object Object],"xf-trigger-4",[object Event],false,true)@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1328
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/admin/peer_reviews:258
([object Event])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7172
([object HTMLSpanElement],"DOMActivate")@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:7282
([object HTMLButtonElement])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:5495
([object MouseEvent])@http://ec2-46-137-10-196.eu-west-1.compute.amazonaws.com:9004/resource/xsltforms/xsltforms.js:1583
ReferenceError
DebugConsole is not defined
|