learninghtml
07-05-2003, 10:53 AM
Hi,
I orignally posted this on the HTML forum but thought the JS forum would be more appropriate for this problem...
I have a page where I want users to be able to click a button and hear a particular sound. But I am having problems...
Here's the code...
In the head...
<script type="text/javascript">
<!--
function playsound(sdnumber) {
document.embeds[sdnumber].play();
}
// -->
</script>
In the body...
<embed src="Sounds/doorslam.mp3" hidden=true autostart=false>
and for the button link...
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('DoorSlam','','Buttons/snd_doorslam_down.gif',1)"
onClick="playsound('0');return false; ">
<img src="Buttons/snd_doorslam_up.gif" alt="A door slamming in a cavernous space. " name="DoorSlam" width="150" height="30" border="0" align="absmiddle"></a>
I've cut out irrelevant code and there is more than one sound (and button). In preview on Dreamweaver it works fine but when uploaded (same browser - IE6) it does two things firstly it invokes my Download Accelerator (DAP) and then displays the following script error....
"Could not complete the operation due to error ffffffce"
The DAP problem I solved by removing the appropriate file association. This will only work on my machine of course. Is there a way of preventing any DA program of 'seeing' the file as a download trigger?
It works fine locally on Internet Exploder 6 when previewing and not at all in Netscrape.
The errors only appear in IE6 when viewed on-line after upload.
Server-side problem?
Website: www.codsalldramaticsociety.co.uk
Page is a test hence it's 'hidden' - Click on the logo top-left corner to access the page.
Please help!
I orignally posted this on the HTML forum but thought the JS forum would be more appropriate for this problem...
I have a page where I want users to be able to click a button and hear a particular sound. But I am having problems...
Here's the code...
In the head...
<script type="text/javascript">
<!--
function playsound(sdnumber) {
document.embeds[sdnumber].play();
}
// -->
</script>
In the body...
<embed src="Sounds/doorslam.mp3" hidden=true autostart=false>
and for the button link...
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('DoorSlam','','Buttons/snd_doorslam_down.gif',1)"
onClick="playsound('0');return false; ">
<img src="Buttons/snd_doorslam_up.gif" alt="A door slamming in a cavernous space. " name="DoorSlam" width="150" height="30" border="0" align="absmiddle"></a>
I've cut out irrelevant code and there is more than one sound (and button). In preview on Dreamweaver it works fine but when uploaded (same browser - IE6) it does two things firstly it invokes my Download Accelerator (DAP) and then displays the following script error....
"Could not complete the operation due to error ffffffce"
The DAP problem I solved by removing the appropriate file association. This will only work on my machine of course. Is there a way of preventing any DA program of 'seeing' the file as a download trigger?
It works fine locally on Internet Exploder 6 when previewing and not at all in Netscrape.
The errors only appear in IE6 when viewed on-line after upload.
Server-side problem?
Website: www.codsalldramaticsociety.co.uk
Page is a test hence it's 'hidden' - Click on the logo top-left corner to access the page.
Please help!