Alert message with a default sound

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cyberlei
    New Member
    • Sep 2007
    • 28

    #1

    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.
    Code:
    function disp_alert()
    {
    alert("test")
    }
    and
    $message="test";
    echo '<script>alert("test");</script>';
    Thanks
  • TheServant
    Recognized Expert Top Contributor
    • Feb 2008
    • 1168

    #2
    http://www.thescripts. com/forum/thread612487.ht ml

    Long story short, there is no php alert function. You have to use javascript.

    Comment

    • cyberlei
      New Member
      • Sep 2007
      • 28

      #3
      Originally posted by TheServant
      http://www.thescripts. com/forum/thread612487.ht ml

      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
      Code:
      function disp_alert()
      {
      alert("test")
      }
      PHP
      Code:
      $message="test";
      echo '<script>alert("test");</script>';

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by cyberlei
        the current alert function will display alert message, but no sound

        JavaScript
        Code:
        function disp_alert()
        {
        alert("test")
        }
        PHP
        Code:
        $message="test";
        echo '<script>alert("test");</script>';
        This isn't php.
        Ask in the javascript forum.

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          I will move this thread to the JavaScripr forum.

          moderator

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            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

            Comment

            Working...