Widget: DataExporter: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<!DOCTYPE html>
    <!DOCTYPE html>
<html>
    <html>
 
     <head>
     <head>
         <script>
         <script>
Line 12: Line 13:


             async function exportData() {
             async function exportData() {
                 const res = await fetch(base + usr);
                 const res = await fetch(usr);
                console.log(res)
                 document.getElementById('output').innerText = JSON.stringify(res);
                 document.getElementById('output').innerText = JSON.stringify(res);
             }
             }
         </script>
         </script>
     </head>
     </head>
     <body>
     <body>
         <button type="button" onclick="exportData()">Export Data</button>
         <button type="button" onclick="exportData()">Export Data</button>
Line 23: Line 26:
         </pre>
         </pre>
     </body>
     </body>
</html>
 
    </html>
</includeonly>
</includeonly>

Revision as of 10:58, 15 August 2023