SHARE
TWEET

Untitled

a guest Jun 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#export").click(function (event) {
  2.                 // var outputFile = 'export'
  3.                 var outputFile = window.prompt("What do you want to name your output file (Note: This won't have any effect on Safari)") || 'export';
  4.                 outputFile = outputFile.replace('.csv','') + '.csv'
  5.  
  6.                 // CSV
  7.                 exportTableToCSV.apply(this, [$('#tablecontainer > table'), outputFile]);
  8.  
  9.                 // IF CSV, don't do event.preventDefault() or return false
  10.                 // We actually need this to be a typical hyperlink
  11.             });
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top