Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > button to download a file

Reply
Thread Tools

button to download a file

 
 
Andrew Poulos
Guest
Posts: n/a
 
      03-05-2007
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
 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      03-05-2007
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
 
Reply With Quote
 
 
 
 
Walton
Guest
Posts: n/a
 
      03-05-2007
On Mar 5, 4:55 am, Andrew Poulos <ap_p...@hotmail.com> wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct Download Movies - No Download Limits - Download DivX DVDMovies hussain dandan Python 0 12-06-2009 04:52 AM
Forcing Download of File Appends HTML from Download Page to Downloaded File? Brett Kelly ASP .Net 1 06-16-2006 04:05 AM
problem with code download file - two window file download Sam -- ASP .Net 2 03-17-2005 04:20 PM
Re: How can I display a download link in my (C#) ASP.NET web form to download a file stored in my sql db? Steve C. Orr [MVP, MCSD] ASP .Net 0 03-07-2005 07:14 PM
File upload/download from database. Download appends aspx page to end of file Ryan Taylor ASP .Net 2 11-10-2004 08:31 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57