Javascript "Save As" when used with execCommand?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suitland
    New Member
    • May 2006
    • 1

    Javascript "Save As" when used with execCommand?

    Hi All,

    I am using the execCommand(Sav eAs) function to save an HTML file as an xls file, and works fine when I open the program and open the file. Is there anyway I can trigger an Open dialog box asking if the user wants to open the file after the file finished downloading?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You can do this through the default browser behaviour, by forcing a download using server-side code. Set the content-disposition headers and the browser will prompt the user to either save the file or open it using Excel.

    Comment

    Working...