The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> sound button, Forum bell
happyman123uk
post Jul 7 2014, 02:23 PM
Post #1





Group: Members
Posts: 1
Joined: 7-July 14
Member No.: 21,208



I have a web site with a members lounge where members can sit and wait until someone else comes into the room the problem I have is a lot of the members have this page minimized and don't see other members come in.I wanted to make a bell of some sort they can press when they enter so they can alert other members who have the page minimized.Someone gave me this code but it don't seem to work


<html>
<head>
<script type="text/javascript">
function playSound(file) {
document.getElementById("dummy").innerHTML="<embed src=\""+file+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";}
</script>
</head>
<body>
<div id="dummy" style="display:none;"></div>
<p>
<input type="button" onClick="playSound('yourFile.wav');" value="Play!" />
</p>
</body>



I have also uploaded the wave sound to my public folder in my drop box this is the link for that

https://dl.dropboxusercontent.com/u/37416867/doorbell-1.wav


any help would be great
cheers
Happyman123uk
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 9th December 2018 - 06:54 PM