ExtJS/JavaScript - how to post list of grid records to download url? -
i need pass record or list of records post param download action... possible?
a seemingly straight forward question complex answer. mdn has written better ever do:
https://developer.mozilla.org/en-us/docs/web/guide/html/forms/sending_forms_through_javascript
for extjs approach create form without rendering it:
var formpanel = ext.create('ext.form.panel', { url: 'https://www.sencha.com/img/learn/extdesignergettingstarted_html_m4fab468.png', standardsubmit:true, baseparams: { param1: 'textfield', param2: 123 } }); formpanel.form.submit(); delete formpanel;
this creates post params this:
note header have respond specific headers trigger download in browser, see: https://stackoverflow.com/a/3358583/1861459
Comments
Post a Comment