Click here to Skip to main content
15,847,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have a dumb question...

i put a javascript code to play an audio notification in my page

<pre lang="Javascript">
<script type="text/javascript">
var soundObject = null;
function PlaySound() {
var playerObj = document.getElementById("playaudio");;

<pre lang="HTML">
<audio id="playaudio"><source src="/sounds/sound.wav" type="audio/wav" /></audio>

my question is, is the sound.wav be downloaded to the client and play/execute?

if not, how can i achieve to play the notification to the client?
Sergey Alexandrovich Kryukov 5-Nov-13 1:55am    
What does it mean, "play the notification"?
Sampath Lokuge 5-Nov-13 2:01am    
Is your code working ? If so then you can check yourself whether is it download or not :)
sirch fsarso 5-Nov-13 2:18am    
@Sergey adding audio notification to page (ex. play audio if new record arrives)

@Sampath its working on my localpc
Sampath Lokuge 5-Nov-13 3:17am    
Is it not working when you published ?
sirch fsarso 5-Nov-13 4:14am    
yes, i try to run it on local network but didn't play

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900