/    Sign up×
Community /Pin to ProfileBookmark

download file inline

Hi

I want to make it so that i can click on a link and a save file box appears without reloading the entire page.

Also if possible i once the file is downloaded or if the user clicked on download that the page refreshes.

Any help?

Oh its a csv file

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@bokehNov 02.2006 — Go to [URL=http://www.php.net/header]this page in the manual[/URL] and read what it say about the [I]Content-Disposition[/I] header.
Copy linkTweet thisAlerts:
@stephan_gerlachauthorNov 03.2006 — according to that page it wouldn't work properly thanks to M$. I found something that makes it work though.

instead of giving the propper content-type i simply write force-download and this works in IE and firefox exactly the way i need it to work.
Copy linkTweet thisAlerts:
@bokehNov 03.2006 — according to that page it wouldn't work properly thanks to M$. I found something that makes it work though.

instead of giving the propper content-type i simply write force-download and this works in IE and firefox exactly the way i need it to work.[/QUOTE]
The only problem is with IE 4. Thats like worrying about people still using eight tracks.
Copy linkTweet thisAlerts:
@stephan_gerlachauthorNov 03.2006 — if the user has IE4 can he/she just right click on the link and say save target as?
Copy linkTweet thisAlerts:
@bokehNov 03.2006 — if the user has IE4 can he/she just right click on the link and say save target as?[/QUOTE]I don't know but it is very unlikely the user will have IE4. I just ran my stat program through my Apache log going back one year. Out of 2.4 million requests I have zero requests from IE 4 and three requests from IE 3.
×

Success!

Help @stephan_gerlach spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...