Re: [Xsltforms-support] Question about show='new' in submission
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2017-04-25 19:40:56
|
Hi Winona, The Profiler is, itself, an XForms page. It uses an XPath expression such as "serialize(instance('view'),'application/xml','yes')" where the third parameter is about indentation. --Alain Le 22/04/17 à 14:24, Winona Salesky a écrit : > Yes disable the popup blocker did fix this. I think adding a try catch > could be useful. > Is there different way to allow users to view the XML instance data? > For example, perhaps I could take advantage of some of the code that > the profiler uses, but just isolate the instance information? > Thanks for your help! > -Winona > > > On Sat, Apr 22, 2017 at 3:51 AM, Alain Couthures > <ala...@ag... <mailto:ala...@ag...>> > wrote: > > 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 >> <http://www.w3.org/1999/xhtml>"xmlns:xf="http://www.w3.org/2002/xforms >> <http://www.w3.org/2002/xforms>"xmlns:xi="http://www.w3.org/2001/XInclude >> <http://www.w3.org/2001/XInclude>"xmlns:ev="http://www.w3.org/2001/xml-events >> <http://www.w3.org/2001/xml-events>"xmlns:tei="http://www.tei-c.org/ns/1.0 >> <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 >> <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 >> Xsl...@li... >> <mailto:Xsl...@li...> >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> <https://lists.sourceforge.net/lists/listinfo/xsltforms-support> > |