469,357 Members | 1,601 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,357 developers. It's quick & easy.

Using the Save Dialog

12
Hi,
I am using in JS the save dialog:
Expand|Select|Wrap|Line Numbers
  1. 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!
May 3 '09 #1
2 1845
acoder
16,027 Expert Mod 8TB
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.
May 3 '09 #2
rnd me
427 Expert 256MB
usually you can simply specify a file extension in the filename box of a saveAs dialog, over-riding what the type combo says.
May 13 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Venkat | last post: by
3 posts views Thread by Random Person | last post: by
1 post views Thread by Daveyk0 | last post: by
2 posts views Thread by Alvo von Cossel I | last post: by
4 posts views Thread by John | last post: by
4 posts views Thread by Richard | last post: by
1 post views Thread by M Pearson | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.