[Xsltforms-support] Another way to do an image preview
Brought to you by:
alain-couthures
From: Dan M. <dan...@gm...> - 2014-09-29 15:53:07
|
Although Alain is working on a new way to view images that are dynamically selected, as a workaround I did figure out how to open a new "preview" alert panel using the show new option of a submission: <xf:submission id="get-image-submission" method="get" replace="all" show="new"> <xf:resource value="concat('../views/view-image.xq?file=', instance('save-data')/filename)"/> </xf:submission> You just need to store the filename you just selected in an upload control in the "filename" element in the example above. Note that for this hack to work you MUST configure your browser to allow popups. I will post a full example in the XForms wikibook after it is finished. - Dan -- Dan McCreary http://danmccreary.com Co-author: Making Sense of NoSQL <http://manning.com/mccreary> office: (952) 931-9198 cell: (612) 986-1552 skype: dmccreary47 |