From: FAQ server on
-----------------------------------------------------------------------
FAQ Topic - How do I prompt a "Save As" dialog for an
accepted mime type?
-----------------------------------------------------------------------

It is not possible with client-side javascript.

Some browsers accept the Content-Disposition header, but this
must be added by the server. Taking the form:-
` Content-Disposition: attachment; filename=filename.ext `

http://classicasp.aspfaq.com/general/how-do-i-prompt-a-save-as-dialog-for-an-accepted-mime-type.html

http://support.microsoft.com/kb/q260519/


The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/

--

The sendings of these daily posts are proficiently hosted
by http://www.pair.com.

From: "Michael Haufe ("TNO")" on
On Apr 26, 6:00 pm, "FAQ server" <javascr...(a)dotinternet.be> wrote:
> -----------------------------------------------------------------------
> FAQ Topic - How do I prompt a "Save As" dialog for an
> accepted mime type?
> -----------------------------------------------------------------------
>
> It is not possible with client-side javascript.
>
> Some browsers accept the Content-Disposition header, but this
> must be added by the server. Taking the form:-
> ` Content-Disposition: attachment; filename=filename.ext `
>
> http://classicasp.aspfaq.com/general/how-do-i-prompt-a-save-as-dialog...
>
> http://support.microsoft.com/kb/q260519/
>
> The complete comp.lang.javascript FAQ is athttp://jibbering.com/faq/
>

I truly wish that this topic was updated from our arguments from last
time...
From: "Michael Haufe ("TNO")" on
On Apr 26, 9:21 pm, "Michael Haufe (\"TNO\")"
<t...(a)thenewobjective.com> wrote:
> I truly wish that this topic was updated from our arguments from last
> time...

s/from/with
From: Garrett Smith on
Michael Haufe ("TNO") wrote:
> On Apr 26, 9:21 pm, "Michael Haufe (\"TNO\")"
> <t...(a)thenewobjective.com> wrote:
>> I truly wish that this topic was updated from our arguments from last
>> time...
>
> s/from/with
Last time it came up, there was no discussion. The time before that, I see:
http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/7414cdc6ca1a0005

- is that what you meant?

Therein, the demo page:
http://thenewobjective.com/temp/save.html

Running that demo in IE7, the image is not displayed. Clicking "prompt
save" results in a javascript error: "The data area passed to a system
call is too small."

I recall another discussion where there was mention of a way to get a
similar effect from IE, however nobody wrote a cross browser solution.
--
Garrett
comp.lang.javascript FAQ: http://jibbering.com/faq/
From: "Michael Haufe ("TNO")" on
On Apr 26, 10:21 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote:
> I recall another discussion where there was mention of a way to get a
> similar effect from IE, however nobody wrote a cross browser solution.
[...]
> I recall another discussion where there was mention of a way to get a
> similar effect from IE, however nobody wrote a cross browser solution.

http://thenewobjective.com/temp/save2.html

This seems to work on all common browsers minus Chrome (where I can't
tell if this is a bug or intentional behavior).

Regardless, the claim that "It is not possible with client-side
javascript." is inaccurate and should be changed to mention the
approaches used through base64 and document.execCommand("SaveAs"...)

The details on what warrants an appropriate example should be separate
debate I think.