SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Guru Bullschmidt's Avatar
    Join Date
    Apr 2002
    Location
    USA
    Posts
    524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Have Download Dialog Be Shown

    Is it possible to have a link to a file such as http://thesite.com/thefile.txt in such a way that when the user clicks on it he is asked if wants to save the file to his disk?

    Maybe something could be done with window.open or something?

    I know this automatically happens already with .zip files but I was wondering if it can be done for other file types too?

    Thanks!
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.execCommand('SaveAs',false,'somefile.txt')

    same thing as the other post


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •