creating a download dialog box.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Archanak
    New Member
    • Sep 2006
    • 79

    creating a download dialog box.

    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
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Standard JavaScript can't do this.

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

    Comment

    • Archanak
      New Member
      • Sep 2006
      • 79

      #3
      Originally posted by acoder
      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

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        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...).

        Comment

        Working...