Solved

audio alert: make a web page beep

Posted on 2001-09-10
3
1,188 Views
Last Modified: 2010-08-05
i would have thought this was easy, but it just doesn't want to work for me. i have an on-the-fly web page that refreshes itself automatically, but *only* if there's new info to be shown. since a user might have several open browsers i want the page to cause a windows beep when it loads. this way, when it refreshes with new data, the user is alerted to check it.

i've tried stuff like:
print chr(7);
print qq~<Win32::Sound::Play("SystemExclamation")>~;
print "\a";
print "\007";

i'm running perl 5 on a unix box. any suggestions?
0
Comment
Question by:joseph4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Expert Comment

by:Kim Ryan
ID: 6472588
Keep in mind that HTML is independant of  opeasting systems, so calls to Windows functions seem out of place. You could try the bgsound tag. This will paly a sound on loading and user refresh, not sure about an auto refresh.

<bgsound src="/windows/media/chord.wav">

Another alternative is the <object> tag to embed a sound
0
 

Author Comment

by:joseph4
ID: 6472879
thanks, teraplane,

i'll try the <bgsound src="/windows/media/chord.wav">, but i don't want to embed and cause the browser to launch winamp or whatever
0
 
LVL 1

Accepted Solution

by:
Vahan Yerkanian earned 100 total points
ID: 6481538
Note that bgsound works only on IE, it wont work on other browsers.
Your best choice is embedding the sound through a flash movie clip,
as flash player is integrated into most of the modern browsers, and
this way you won't have winamp or other alike program launched each
time you want the sound.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question