By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,434 Members | 2,994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,434 IT Pros & Developers. It's quick & easy.

creating a download dialog box.

P: 79
Hi,

I have a text file called file.txt.

In my output page i have to provide the option to download that file.

The moment user click download the dialog box should appear like how usually for downloading some file or folder from online.

like You have chosen file.txt.

what do you want with this?

A typical download dialog box for downloading.

How to do that?

with regards
Archana
Jan 17 '08 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
Standard JavaScript can't do this.

Setting the Content-Disposition header from the server-side usually pops up a dialog box.
Jan 17 '08 #2

P: 79
Standard JavaScript can't do this.

Setting the Content-Disposition header from the server-side usually pops up a dialog box.
Hi,

Thank u very much.

I will read about content disposition.


with regards
Archana
Jan 18 '08 #3

acoder
Expert Mod 15k+
P: 16,027
You're welcome. If you want a very simple solution, just pop the file into a zip archive and most browsers will put up a download dialog box, if clicked. Most people, if not all, have some means of unzipping an archive. Another option is to inform your users how to download (right-click -> save as...).
Jan 18 '08 #4

Post your reply

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