daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <button onclick='send()'>Pobierz aktualne pliki csv</button>
  2. <script>
  3.   var send = function() {
  4.       var items = ['731','421'] //pobieranie z listy
  5. for(var i=0, l = items.length; i < l; i++){
  6.     var request = new XMLHttpRequest();
  7. request.open('POST', 'https://www.iaai.com/Auctions/BranchListingView.aspx?branchCode=' + items[i], /* async = */ false);
  8. var formData = new FormData();
  9.     formData.append('__EVENTTARGET', 'ctl00$ContentPlaceHolder1$DownloadLinkButton');
  10. request.send(formData);
  11. console.log(request.response);
  12.  
  13. let csvContent = "data:text/csv;charset=utf-8," + request.response;
  14. var new = csvContent.replace('#', '');
  15. var encodedUri = encodeURI(new);
  16. window.open(encodedUri);
  17. }
  18.  
  19.   };
  20. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top