Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Automatic Download?

    Hi,
    When the user loads the html page I want it to automatically start a download of a file. So what I did was this:

    ...
    <head>
    <meta http-equiv="Refresh" content="1; URL=homedir/file.mrc">
    </head>
    ...

    Instead, it displays the file, and it looks real messy because it isn't strictly text. How do I get it to automatically download when the page loads? Is there anyway of doing it using javascript, php, cgi, etc.?

    Thanks,
    JD

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just a warning this will chase people from your site... If I go to a site and it tries to download something onload... I'm off like a prom dress!
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what my users want. I need the download to start automatically. How?

  • #4
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the browser just recognizes the extension as a text file it can open and read itself, in order to make the file download you will either have to rename the extension, and have them change it later or zip up the file first, and offer that to download.


  •  

    Posting Permissions

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