Doesn\'t matter what I do, I simply can\'t get this to play a sound in Firefox or IE, or Chrome for that matter.
Try using this revised version of the function play()
function play()
{
var embed=document.createElement('object');
embed.setAttribute('type','audio/wav');
embed.setAttribute('data', 'c:\test.wav');
embed.setAttribute('autostart', true);
document.getElementsByTagName('body')[0].appendChild(embed);
}
The problem with your code was you were using the src attribute, which is for the
This works similar to the noscript tag, where older browsers that don't support the object tag resort to the embed tag.