Using the Save Dialog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BeMe
    New Member
    • Jul 2008
    • 12

    Using the Save Dialog

    Hi,
    I am using in JS the save dialog:
    Code:
    window.document.execCommand('SaveAs', true, "NewFile");
    the save dialog appears,
    but in the combo box of "Save as type" there's only html.
    I want to know if I could put there different file types, like txt, xls...
    and how...

    Thanks for helping!
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    I don't think there is. In fact, in some versions of IE, if you specify a non-text file, it will not even work without a hotfix. It also goes without saying that this works in IE only, so should be avoided if possible - it's better to go server-side.

    Comment

    • rnd me
      Recognized Expert Contributor
      • Jun 2007
      • 427

      #3
      usually you can simply specify a file extension in the filename box of a saveAs dialog, over-riding what the type combo says.

      Comment

      Working...