var auto_refresh = setInterval(
function ()
{
// call your php through ajax -- which inturn checks your db
$.ajax({
url: "script.php",
type: "POST",
data: {id : menuId},
dataType: "json",
success: function(){
alert('success');
//if there is data to be populated, play sound and populate you div/textarea
}
});
}, 10000); // refresh every 10000 milliseconds
for the sound you can try this Cross-platform, cross-browser way to play sound using jQuery 1.4?, i have never tried but the answer has been accepted so should work. if it doesnot work you may also try this https://github.com/admsev/jquery-play-sound