B
ben
Hi,
i put a wav file in a webpage but the sound must be heard only when the
mouse is clicked on a picture. See the code:
</HEAD><BODY>
<embed id="noise" type="audio/wav" loop=0 width="0" height="0" hidden>
....
<img border="0" id="cam" src="webcam.gif" OnClick="startnoise()" >
....
<script language=javascript>
function startnoise() {
document.getElementById("noise").src="machine.wav" }
</script>
It doesn't work (nor IE neither Netscape): no sound.
Any idea how to solve this? (if i use 'bgsound' it works with IE, but then
netscape doesn't work)
Thanks
ben
i put a wav file in a webpage but the sound must be heard only when the
mouse is clicked on a picture. See the code:
</HEAD><BODY>
<embed id="noise" type="audio/wav" loop=0 width="0" height="0" hidden>
....
<img border="0" id="cam" src="webcam.gif" OnClick="startnoise()" >
....
<script language=javascript>
function startnoise() {
document.getElementById("noise").src="machine.wav" }
</script>
It doesn't work (nor IE neither Netscape): no sound.
Any idea how to solve this? (if i use 'bgsound' it works with IE, but then
netscape doesn't work)
Thanks
ben