0

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?

vishnu
  • 19
  • 2
  • 2
  • 6
  • 1
    you actually make your server pc beep this way. – lock Oct 18 '10 at 23:12
  • You're trying to generate the beep the client or the server? – palswim Oct 18 '10 at 23:12
  • 2
    Duplicate: http://stackoverflow.com/questions/879152/how-do-i-make-javascript-beep – ghoppe Oct 18 '10 at 23:13
  • In this way my server is also not beeping. I need to generate this at client side only. – vishnu Oct 18 '10 at 23:26
  • seems to be Duplicate but not discussed on PC beep at client side – vishnu Oct 18 '10 at 23:27
  • Unfortunately the web lack of "standardization" and it is a trouble to each developer in the earth. I recommend you to really try every script you find in the web, and implement and customize it to your project, the human being is so good to make good war, but not to create a good standard! – devasia2112 Apr 28 '12 at 21:15

1 Answers1

1

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).

lock
  • 6,404
  • 18
  • 58
  • 76
  • what is the meaning of 'javascript's alert function which comes with a beep sound '. Am i need to display alert? – vishnu Oct 18 '10 at 23:25