Widget: DataExporter: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
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]]'; |