Go Back   CodingForums.com > :: Client side development > HTML & CSS

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 05-23-2005, 07:12 PM   PM User | #1
atstone1997
New to the CF scene

 
Join Date: May 2005
Location: Arizona
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
atstone1997 is an unknown quantity at this point
"a href=" Download Problem Please help

Hello, and thanx in advance for the help.
I have a line in my html that is as follows:

<a href="mad_<%=sVNumber%>.fil">Click here to Download Activation File</a>

This is on a web page on our company's local intranet, on some computers within the network the open save dialog box displays once clicking on the link. On others the file which is a text document is displayed in internet explorer. I need the file to always download. I tried the file method by the file isn't stored locally on the user's computer. It's on the server where the web page is ran from.

Please Help
Toby Stone
atstone1997 is offline   Reply With Quote
Old 05-23-2005, 08:11 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
This might help you get in the right direction.
Here is text.php
PHP Code:
<?php
header
('Content-type: text/plain');
header('Content-disposition: attachment; filename="test.txt"');
readfile('[text.php]');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>

</body>
</html>
here is test.txt
Code:
This should be downloaded.
If you link directly to text.php, a dialog box will be prompted to download the text file if your server supports this, I no reason why it shouldn't. Also this should be in the php forum, don't repost it, a mod will move this for you.
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-23-2005, 09:52 PM   PM User | #3
atstone1997
New to the CF scene

 
Join Date: May 2005
Location: Arizona
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
atstone1997 is an unknown quantity at this point
Reply:

Actually the file name changes each time the web site is addressed. Your response seems a little to complicated to what I was attempting to accomplish. I've been trying to determine if there are settings that are incorrect in either IIS, or internet explorer, or the users registry. I don't think re-enginering the way the website currently functions is the proper answer. But I thank you for a response.
atstone1997 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 03:45 AM.


Advertisement
Log in to turn off these ads.