Hi Winona,

I suspect that this issue is just due to pop-ups not being allowed.

The error about w.document is just after this instruction: var w = window.open("about:blank","_blank");

I should probably wrap this with a try-catch statement just to alert users about allowing popup. What do you think?

--Alain

Le 21/04/17 à 23:15, Winona Salesky a écrit :
Hi All,
I'm trying to open my instance in a new window, using a submission with show='new' and am getting this error:

0 -> Dispatching event xforms-submit on <SPAN class="xforms-submission" id="send"/> 0 -> Dispatching event xforms-submit-serialize on <SPAN class="xforms-submission" id="send"/>
1 -> Submit post - application/xml - services/submit.xql - false
5 -> Dispatching event xforms-submit-done on <SPAN class="xforms-submission" id="send"/>
1 -> TypeError: null is not an object (evaluating 'w.document')
0 -> Dispatching event xforms-submit-error on <SPAN class="xforms-submission" id="send"/>


When I remove the show='new' it runs as expected.
Simple form demonstrating:

<?xml version="1.0" encoding="UTF-8"?>

<htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:xf="http://www.w3.org/2002/xforms"xmlns:xi="http://www.w3.org/2001/XInclude"xmlns:ev="http://www.w3.org/2001/xml-events"xmlns:tei="http://www.tei-c.org/ns/1.0";>
<head>
<title>Syriaca.org: Create New Record</title>
<xf:model>
<xf:instancexmlns="http://www.tei-c.org/ns/1.0"id="i-uri-range";>
<div>
<rangetype="test"start="2"end="3"who="4"note="5"/>
</div>
</xf:instance>
<xf:submissionid="send"method="post"show="new"replace="all"action="services/submit.xql"/>
</xf:model>
</head>
<bodystyle="margin:30px;">
<divclass="section">
<h1>Test submit</h1>
<xf:submitsubmission="send">
<xf:label>Submit</xf:label>
</xf:submit>
</div>
</body>
</html>

I'm running XSLTForms in eXist.

Is this a bug, or an incorrect use of the show attribute on my part? I am trying to create a way for users to view and download an instance without saving it.

Thanks for the help,

-Winona




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to