Solved

audio alert: make a web page beep

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

867 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

13 Experts available now in Live!

Get 1:1 Help Now