[Xsltforms-support] JSON bug
Brought to you by:
alain-couthures
From: Stephen C. <ste...@gm...> - 2012-08-23 01:09:30
|
Hi Alain, There is a simple bug in revision 556 regarding JSONP support from line 3885 if (this.mediatype === "text/jsonp") { XsltForms_browser.jsoninstobj = !instance ? (node ? document.getElementById(XsltForms_browser.getMeta(node.documentElement ? node.documentElement : node.ownerDocument.documentElement, "instance")).xfElement : this.model.getInstance()) : document.getElementById(instance).xfElement; var scriptelt = XsltForms_browser.isXhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "script") : document.createElement("script"); << scriptelt.setAttribute("src", action.replace(/&/g, "&")+((action.indexOf("?") === -1) ? "?" : "&")+"callback=jsoninst"); >> scriptelt.setAttribute("src", action.replace(/&/g, "&")+((action.indexOf("?") === -1) ? "?" : "&")+"callback=XsltForms_browser.jsoninst"); scriptelt.setAttribute("id", "jsoninst"); scriptelt.setAttribute("type", "text/javascript"); body = XsltForms_browser.isXhtml ? document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "body")[0] : document.getElementsByTagName("body")[0]; body.insertBefore(scriptelt, body.firstChild); XsltForms_xmlevents.dispatch(this, "xforms-submit-done"); XsltForms_globals.closeAction(); } else { The ALA web service does support JSONP once you know what it does its quite neat! Regards Steve |