sound button, Forum bell |
sound button, Forum bell |
happyman123uk |
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 |
Lo-Fi Version | Time is now: 26th April 2024 - 02:37 PM |