Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:43:30+00:00 2026-06-06T21:43:30+00:00

So I found only 1 question that was similar to mine, and the answer

  • 0

So I found only 1 question that was similar to mine, and the answer didn’t really help none so I am hoping asking with my own code might help me find the answer I am looking for.

I am wanting to add sound to my shoutbox when a new post is made. I believe that the piece of code that the play sound function would go would be here

function shouts() {
                clearTimeout(getshout);
                var xmlHttp = (window.XMLHttpRequest) ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP");
                xmlHttp.open("GET", "shoutbox/shouts.php?i=" + Math.random());
                xmlHttp.onreadystatechange = function() {
                    if (this.readyState == 4) {
                        if (parseInt(this.responseText) > current_shouts) {
                            getshouts();
                            current_shouts = parseInt(this.responseText);
                        }
                        getshout = setTimeout("shouts()", 1000);
                    }
                }
                xmlHttp.send(null);
            }

But I am not 100% sure, I do know that this is where it checks for new entries in the database, the corresponding php code that is called by this function is

<?php
    require_once("../config.php");
    echo implode(mysql_fetch_assoc(mysql_query("SELECT COUNT(id) FROM shout")));
?>

I am pretty sure that this code doesn’t have to be touched in order to do this. I have done searches on Google, and checked multiple forums but I have yet to find a way that actually works, I am not asking for you guys to write the code for me, just give me a push in the right direction!

If there is anything else needed please let me know and I will edit my post.

Thanks, Casey

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:43:32+00:00Added an answer on June 6, 2026 at 9:43 pm

    Somewhere on your page have

    <audio id="myaudio" src="shout.mp3"></audio>
    

    And on getting a new shout (maybe before the call to getshouts()) do

    document.getElementById('myaudio').play();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found a similar question here, but didn't help me. I basically have apache
The only similar question I have found is: Insert php boolean into mysql bit
I found this question but it was only similar and, more importantly, dated by
I understand that this question is similar to others asking about Java Properties, and
I found a few questions similar to mine but none of the answers are
Hey I've found a lot of people asking questions similar to mine but not
I looked for a similar question, but only found similar ones such as Godaddy
UPDATE: found similar question: Rx - unsubscribing from events Given the code: interface IBitmapCapturer
Well the title pretty much sums the question. The only thing I found is
I found a similar question about getting just the rotation, but as I understand

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.