Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-06-2002, 12:53 AM   PM User | #1
jdavidw13
New Coder

 
Join Date: Jul 2002
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
jdavidw13 is an unknown quantity at this point
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
jdavidw13 is offline   Reply With Quote
Old 12-06-2002, 01:37 AM   PM User | #2
webmarkart
Regular Coder

 
Join Date: Jul 2002
Location: Raleigh, NC
Posts: 484
Thanks: 0
Thanked 0 Times in 0 Posts
webmarkart is an unknown quantity at this point
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
webmarkart is offline   Reply With Quote
Old 12-06-2002, 02:04 AM   PM User | #3
jdavidw13
New Coder

 
Join Date: Jul 2002
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
jdavidw13 is an unknown quantity at this point
This is what my users want. I need the download to start automatically. How?
jdavidw13 is offline   Reply With Quote
Old 12-06-2002, 04:16 AM   PM User | #4
cg9com
Senior Coder

 
Join Date: Jul 2002
Posts: 1,628
Thanks: 0
Thanked 0 Times in 0 Posts
cg9com is an unknown quantity at this point
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.
cg9com is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 04:52 AM.


Advertisement
Log in to turn off these ads.