diff options
Diffstat (limited to 'pdf-as-web/src/main/resources')
-rw-r--r-- | pdf-as-web/src/main/resources/template_error.html | 17 | ||||
-rw-r--r-- | pdf-as-web/src/main/resources/template_provide.html | 13 |
2 files changed, 9 insertions, 21 deletions
diff --git a/pdf-as-web/src/main/resources/template_error.html b/pdf-as-web/src/main/resources/template_error.html index 47ba9c56..21faa082 100644 --- a/pdf-as-web/src/main/resources/template_error.html +++ b/pdf-as-web/src/main/resources/template_error.html @@ -8,20 +8,11 @@ Error Page: <p>##ERROR_MESSAGE##</p> <p>##ERROR_STACK##</p> <script type="text/javascript"> - try { - var data = { - pdfas: { - error: true, - msg: "##ERROR_MESSAGE##" - } - } - parent.postMessage(data, '##PUBLICURL##'); - } catch(error) { - if(window.console) { - window.console.log("Sending message failed! to parent: " + parent, error); - } - } + console.log("sending error msg to parent: " + parent); + window.parent.respond("##PDFDATAURL##", false); + + </script> </body> </html> diff --git a/pdf-as-web/src/main/resources/template_provide.html b/pdf-as-web/src/main/resources/template_provide.html index 28b51ed4..76287404 100644 --- a/pdf-as-web/src/main/resources/template_provide.html +++ b/pdf-as-web/src/main/resources/template_provide.html @@ -7,15 +7,12 @@ PDF ready @: <a href="##PDFDATAURL##">download here</a> <script type="text/javascript"> - var data = { - pdfas: { - success: true, - pdfUrl: "##PDFDATAURL##" - } - } - console.log("sending msg to parent: " + parent); - parent.postMessage(data, '*'); //'##PUBLICURL##'); + + console.log("sending success msg to parent: " + parent); + window.parent.respond("##PDFDATAURL##", true); + + </script> </body> </html> |