473,495 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to get an .mp3 file to play without asking user to download

3 New Member
Hi, I am using the following code on my site:
Click to hear song:<p>
<a target="_blank" href="kokako-short.mp3">
<img border="0" src="images/playIcon.png" width="50" height="50"></a>

but it asks the user which program they want to download to play the mp3 file. I have tried remove the target="blank" but it does the same thing... is it out of my control and depends on the audio software of the computer in question... or is there anyway around it to ensure the audio plays for everyone without any browser questions???
Thanks alot in advance for any help.
Rina
Sep 6 '07 #1
2 1585
Death Slaught
1,137 Top Contributor
Hi, I am using the following code on my site:
Click to hear song:<p>
<a target="_blank" href="kokako-short.mp3">
<img border="0" src="images/playIcon.png" width="50" height="50"></a>

but it asks the user which program they want to download to play the mp3 file. I have tried remove the target="blank" but it does the same thing... is it out of my control and depends on the audio software of the computer in question... or is there anyway around it to ensure the audio plays for everyone without any browser questions???
Thanks alot in advance for any help.
Rina
Well there's a number of different ways to do this, but they all depend on what you wan't here are a few options:

A. You can embed a music player.

B. You can make a link that opens windows media player.

C. You click an image to play the music.

there are more options these are just a few off the top of my head.


Thanks, Death


PS - if none of these are what you wan't please explain what it is your trying to do. ( I think your tryin to get an image to play if so try this:

<p>
<a href="kokako-short.mp3">
<img border="0" src="="images/playIcon.png"
width="50"
height="50">
</a>
</p>

the reason i took out the "target="_blank" is because it opens up a knew page then it opens windows media player.)

lol well I don't know what your problem is the script i just put works for me i just used a different picture and song. ( It's funny because they're the same thing, I just took out "target="_blank" but it worked when i had it. )
Sep 6 '07 #2
drhowarddrfine
7,435 Recognized Expert Expert
is it out of my control and depends on the audio software of the computer in question.
Yes, it is out of your control. If the browser is asking the user to download a program to play the file then either the user has no player or the browser was never told what program to use.
Sep 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
5658
by: atse | last post by:
Hi, I want the MP3 audio files to be able to download by users only. Even I set the pages validated by session, anyone still can type the download url to get my files without access of the pages...
3
10117
by: BOHICA | last post by:
I would like on my page when users click one of my mp3 files for the dialog box to pop up so they can choose to save the file to disk instead of trying to open through IE, but the dang thing won't...
12
2551
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
4
6235
by: Drew | last post by:
I have been looking all over the web for an example of how to accomplish this. I am trying to download a comma seperated file from a https server. I can't establish the connection - the error reads...
3
6768
by: kim | last post by:
GOOD morning, I try to open xx.vbs in <href="./xx.vbs"></hef> but it pop up the file download mesage. How can i disabled it? I try another solution like this : set ws =...
9
5585
by: Morris Neuman | last post by:
Im working with VS 2005 and trying to use a Hyperlink field in a datagrid to play a wave file that is not located in the website folders but is in a plain folder on the same machine, windows 2003...
3
1966
by: bfmcfarlane | last post by:
I have an appication that allows users to upload and download files. This application is only accessed when a user clicks on an "Upload / Download" link from within our main application. A new...
4
4162
by: sravan_reddy001 | last post by:
i want a sound to be generated when and event occurs. especially when a message box is displayed and when an user want to close a form(i want to include this in the form closing event) thanks... ...
1
47343
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.