How in JS/jQuery do I pop open the "Save As" dialog for a newly opened window. Basically I am scraping some data off of a web page. As such I am opening a new window via:
dataWindow = window.open('blank','dataWindow');
I then write the output to the blank window but I want to automatically pop open the "Save As" dialog to save the content of the window to a file (text/csv). How would I do this. I tried:
dataWindow.document.execCommand("saveAs",true,".txt");
but it doesn't seem to do anything.