Difference between revisions of "Widget:DataExporter"
From LINKS Community Center
Line 57: | Line 57: | ||
fetch('/api.php?' + exportParams.toString()); | fetch('/api.php?' + exportParams.toString()); | ||
+ | |||
+ | const dl = document.createElement('a'); | ||
+ | dl.href = '/api.php?' + exportParams.toString(); | ||
+ | dl.download = 'export.' + formData.get('fileformat'); | ||
+ | document.body.appendChild(dl); | ||
+ | dl.click(); | ||
+ | document.body.removeChild(dl); | ||
// exportUrl = '/api.php?action=ask&format=spreadsheet&query=[[Category:Disaster Community Technology]]'; | // exportUrl = '/api.php?action=ask&format=spreadsheet&query=[[Category:Disaster Community Technology]]'; |