/    Sign up×
Community /Pin to ProfileBookmark

file download with out right click

if you look at this page it give you an option to download an MP3 file or playing it. if you click down load, it down loads to my down load folder. if i click play it will stream into itunes (i asume if iTunes was not defult player it would paly in somthing else)

[url]http://www2.streamload.com/Nodes/Node.asp?cxInstID=75715674&nodeID=1343781888[/url]

so how do i give the option to people to down load with out haveing to right click?

is this done with javascript or back end scripting. i have php

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterDec 01.2005 — so how do i give the option to people to down load with out haveing to right click?

is this done with javascript or back end scripting. i have php[/QUOTE]

Right clicking ? I tried right clicking everywhere on the page and it didn't do jack. I assume you meant left clicking or that you inversed your default mouse behavior. Now what do you mean by giving people the option to download it without having to right click? Do you mean to have it auto-download without the user triggering any event handlers or do you mean to active it with a different event handler? How is the user given the option to download it if it auto-downloads? I'm not sure what you are trying to do so I cannot give you a straight answer on which to use -- PHP or JavaScript.
Copy linkTweet thisAlerts:
@saulssDec 01.2005 — that is the href of the [download] button, i think he wants to get the same effect, to force download, without having to right click and choose "save target as"

in that site they are using some asp code to force download, that i dont know how to do...

an option would be to have the file inside a zip file and point to it with the [download] link
Copy linkTweet thisAlerts:
@UltimaterDec 01.2005 — @lomokev

Next time please clarity that the example site you link us to [b]isn't[/b] yours and you want to simulate the effect in your own site -- which isn't of the same domain of the first, geez...

If you want a file to autodownload while accessed, your in the wrong forum bud -- It's pure PHP coding, no JavaScript at all. All you have to do is use PHP to echo a different MIME TYPE to the client followed by the content.
×

Success!

Help @lomokev 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 6.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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...