diff --git a/src/main/java/org/gcube/datatransfer/resolver/geoportal/exporter/Geoportal_HTML_Page.java b/src/main/java/org/gcube/datatransfer/resolver/geoportal/exporter/Geoportal_HTML_Page.java index 10595fc..b3fdb74 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/geoportal/exporter/Geoportal_HTML_Page.java +++ b/src/main/java/org/gcube/datatransfer/resolver/geoportal/exporter/Geoportal_HTML_Page.java @@ -61,7 +61,7 @@ public class Geoportal_HTML_Page { + " async function playPDFPoll() {\n" + " const response_object = await fetchPDF_URL();\n" + " try {\n" - + " console.log(\"json response \" + JSON.stringify(error_msg));\n" + + " console.log(\"json response \" + error_msg);\n" + " if (response_object.state === \"OK\") {\n" + " if (!(response_object.url === null) && !(response_object.url === undefined)) {\n" + " window.location.replace(response_object.url);\n" @@ -86,15 +86,21 @@ public class Geoportal_HTML_Page { + " inner_div.innerHTML = error_msg;\n" + " }\n" + "\n" - + " document.onload = function(){\n" - + " document.getElementById('pic1').src= window.location.href + \"img/icon-globe.gif\";\n" - + " document.getElementById('pic2').src= window.location.href + \"img/loading-gears.gif\";\n" + + " function setImages() {\n" + + " console.log(\"json setImages \");\n" + + " document.getElementById('pic1').src = window.location.href + \"img/icon-globe.gif\";\n" + + " document.getElementById('pic2').src = window.location.href + \"img/loading-gears.gif\";\n" + + " }\n" + + " \n" + + " function initPage(){\n" + + " playPDFPoll();\n" + + " setImages();\n" + " }\n" + " \n" + "