473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Alert message with a default sound

Hey Guys,

Just wandering if I can display alert message with a default sound. the current code is below and the problem is no sounds.
Expand|Select|Wrap|Line Numbers
  1. function disp_alert()
  2. {
  3. alert("test")
  4. }
  5. and
  6. $message="test";
  7. echo '<script>alert("test");</script>';
  8.  
Thanks
Feb 21 '08 #1
5 3973
TheServant
1,168 Expert 1GB
http://www.thescripts.com/forum/thread612487.html

Long story short, there is no php alert function. You have to use javascript.
Feb 21 '08 #2
http://www.thescripts.com/forum/thread612487.html

Long story short, there is no php alert function. You have to use javascript.
the current alert function will display alert message, but no sound

JavaScript
Expand|Select|Wrap|Line Numbers
  1. function disp_alert()
  2. {
  3. alert("test")
  4. }
  5.  
PHP
Expand|Select|Wrap|Line Numbers
  1. $message="test";
  2. echo '<script>alert("test");</script>';
  3.  
Feb 21 '08 #3
Markus
6,050 Expert 4TB
the current alert function will display alert message, but no sound

JavaScript
Expand|Select|Wrap|Line Numbers
  1. function disp_alert()
  2. {
  3. alert("test")
  4. }
  5.  
PHP
Expand|Select|Wrap|Line Numbers
  1. $message="test";
  2. echo '<script>alert("test");</script>';
  3.  
This isn't php.
Ask in the javascript forum.
Feb 22 '08 #4
ronverdonk
4,258 Expert 4TB
I will move this thread to the JavaScripr forum.

moderator
Feb 22 '08 #5
gits
5,390 Expert Mod 4TB
hi ...

you cannot really control that with the standard alert ... since that uses the users preferences and in this case the system sound-scheme. so one user gets a sound another don't. you may create a custom dhtml-alert-box and play a sound when displaying it ...

kind regards
Feb 22 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Justin Koivisto | last post by:
Is there a way to create an alert-like message box that uses a custom image? Basically, I want to replace the default ! image with something else. -- Justin Koivisto - spam@koivi.com PHP...
11
by: Alistair Saldanha | last post by:
I'm looking for the event that is fired by Internet Explorer to an "alert": <SCRIPT> Alert("You already have a session open") </SCRIPT> The event would be webBrowser.Document.???? Much...
6
by: bonehead | last post by:
Greetings, I'm working on an e-mail form (btw many thanks to Philip Ronan for the very cool email address format tester function, best I've seen so far). I've been trying, with limited...
3
by: Ersin Gençtürk | last post by:
hi, I wrote a function like this : public static void Alert(string message){ message=message.Replace("'","\'"); message=message.Replace("\n","\\n"); ...
3
by: John | last post by:
hey guys this may not be possible, but i have an if statement that checks to see if a value returned by a sql query is null or not..if it is i execute the right code if it has a value i need to...
7
by: M. Simioni | last post by:
Hi, i'm always auditing ASPNET's account accesses on my webserver, a WIN2K_SP4 + IIS5 + SQLServer2K_SP3a machine. Nearly all the applications work correctly, but i constantly find a message in...
2
by: sebastien1101 | last post by:
how to disable the alert sound (windows system) when a messagebox.show appear ?
2
by: Z1P2 | last post by:
Hello, I'm trying to find a way to replace the user's alert system sound with a custom sound in the following script. Can someone please point me in the right direction? <script...
3
by: Kuldeep | last post by:
Framework: Visual Studio 2005 Technology: ASP.NET 2.0 Language: C#.NET 2.0 Hi All, I have an event procedure as shown below. protected void lnkBtSendEmail_Click(object sender, EventArgs e)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.