Reputation: 19
I want to create a beep on server error in a webpage. I have searched and read the pages below on to display sound on webpage.
http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
But i can't ask users to install plug ins and other stuff. I need to generate two beep on PC speaker. I have tried to use System.out.print("\\007");
and Toolkit.getDefaultToolkit().beep();
but nothing is working. In my JSP i Called in this way:
<%
Toolkit.getDefaultToolkit().beep();
System.out.print("\\007");
%>
Is there any way i can generate sound?
Upvotes: 0
Views: 1974
Reputation: 6614
Thing is you wanted to do something that is client side, which the only way I can think of is to use the javascript's alert function which comes with a beep sound (but this depends on the user's OS and sound scheme).
Upvotes: 1