Entry
How can I produce an acoustical alert with a beep?
Apr 21st, 2000 01:42
Larry Bezeau, Martin Honnen,
Unfortunately client side JavaScript doesn't produce a beep with for
instance
alert(String.fromCharCode(7))
and I don't know of any other js way to produce the beep.
With NN you can call into Java
if (navigator.javaEnabled())
java.awt.Toolkit.getDefaultToolkit().beep();
With IE you can try to start the sound player to play a windows system
wav file:
var wsh = new ActiveXObject('WScript.Shell');
var beep = 'c:\\windows\\media\\ding.wav'
wsh.Run ('sndrec32 /play /close ' + beep ,0, true);