Solved

audio alert: make a web page beep

Posted on 2001-09-10
3
1,180 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
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 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now