Widget: DataExporter: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 45: | Line 45: | ||
exportUrl += '|?' + prop; | exportUrl += '|?' + prop; | ||
if (!!label) exportUrl += '=' + label; | if (!!label) exportUrl += '=' + label; | ||
exportUrl += '<br>'; | // exportUrl += '<br>'; | ||
// output.innerHTML += prop + ' | ' + label + '<br>'; | // output.innerHTML += prop + ' | ' + label + '<br>'; | ||
} | } | ||
Line 54: | Line 54: | ||
exportParams.set('format', 'spreadsheet'); | exportParams.set('format', 'spreadsheet'); | ||
exportParams.set('fileformat', formData.get('fileformat')); | exportParams.set('fileformat', formData.get('fileformat')); | ||
exportParams.set('query', exportUrl); | |||
fetch('/api.php?' + exportParams.toString()); | |||
// exportUrl = '/api.php?action=ask&format=spreadsheet&query=[[Category:Disaster Community Technology]]'; | // exportUrl = '/api.php?action=ask&format=spreadsheet&query=[[Category:Disaster Community Technology]]'; |