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 48: Line 48:
                     // output.innerHTML += prop + ' | ' + label + '<br>';
                     // output.innerHTML += prop + ' | ' + label + '<br>';
                 }
                 }
                exportUrl += '|format=spreadsheet|fileformat=' + formData.get('fileformat');
                 output.innerHTML = exportUrl;
                 output.innerHTML = exportUrl;


                 const exportParams = new URLSearchParams();
                 const exportParams = new URLSearchParams();
                 exportParams.set('action', 'ask');
                 exportParams.set('action', 'ask');
                 exportParams.set('query', exportUrl);
                exportParams.set('format', 'spreadsheet');
                exportParams.set('fileformat', formData.get('fileformat'));
                 exportParams.set('query', encodeURIComponent(exportUrl));


                 // fetch('/api.php?' + exportParams.toString());
                 // fetch('/api.php?' + exportParams.toString());

Revision as of 10:29, 17 August 2023