473,717 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
+ 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 1614
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
5694
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 where download URL provided. How can I do in order to prevent everyone from downloading without a user account? Thanks for any idea? Atse
3
10147
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 do it. Is there script I can plug in without having to do asp or pl files? (Cobalt server does not allow these files) here is an example <a href="/muzak/wong.mp3"> as link
12
2589
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
6251
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 System.Net.WebException: The underlying connection was closed: Could not establish secure channel for SSL/TLS. ---> System.ComponentModel.Win32Exception: The function completed successfully, but must be called again to complete the contex Here...
3
6792
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 = createobject("Wscript.shell") set oexec = ws.exec("<%=server.mapPath(./xx.vbs)%>") But it give error "the path/xx.vbs is not a valid win32 application" May i know why? I think some setting in registry will open the vbs file
9
5606
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 server, WMP 10.0 . If I type the full path in an IE address field it plays the file in WMP When I test my Web page ( running the debugger in VS.) The datagrid has a column called "MsgFile" with the full path to the wave file e.g....
3
1990
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 window is launched asking the user which file he /she wants to download. After the user determines which file to download, the window disappears but the user is provided with the download file dialog box. I have been able to track it down to a...
4
4187
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... Sravan
1
47468
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 on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8719
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9348
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9202
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9048
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7981
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6648
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4739
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3177
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2120
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.