471,886 Members | 1,110 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,886 software developers and data experts.

Using the Save Dialog

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 1885
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 YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.