468,533 Members | 1,903 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

button to download a file

There's a file on the server that users may download. I can display a
link and have people right-mouse click it and choose "save..." but is
there a way to have a button the user clicks that pops up the "save as"
dialog?

I note there's a download behaviour for IE (which doesn't seem to work
in IE 6) but I was hoping for a cross browser solution.

Andrew Poulos
Mar 5 '07 #1
2 4314
ASM
Andrew Poulos a écrit :
There's a file on the server that users may download. I can display a
link and have people right-mouse click it and choose "save..." but is
there a way to have a button the user clicks that pops up the "save as"
dialog?
put files in *.zip
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 5 '07 #2
On Mar 5, 4:55 am, Andrew Poulos <ap_p...@hotmail.comwrote:
There's a file on the server that users may download. I can display a
link and have people right-mouse click it and choose "save..." but is
there a way to have a button the user clicks that pops up the "save as"
dialog?
just for an fyi:

browsers will popup the "save as" dialog depending on what the mime
type of the file is you are linking to. so for instance if you have a
pdf file, your browser sees the mime type as "application/pdf" and
will attemp to open it in the browser. if you have a .zip file, your
browser will see the mime type "application/zip" and recognize that it
should NOT try to open this file in the browser and you will get the
"save as" dialog popup.

Different mime types will either open the "save as" dialog or just try
to open the browser, and maybe some other action i'm missing. I'm not
sure if there are settings in the browser to change those behaviors or
not.

Mar 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by js | last post: by
reply views Thread by Ilia Makarenko | last post: by
4 posts views Thread by mphanke | last post: by
1 post views Thread by user2008 | last post: by
5 posts views Thread by vinodkus | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.