Hello guys, I have some questions :

  • how can i play a sound when the contentChat.php is new.
  • How can i make a loading message?
<script type="text/javascript">
setInterval(function() {
    $('#contentChat').load('contentChat.php');
}, 1000);
</script>

Thank you for your help!
Sanchixx

Member Avatar for LastMitch

@Sanchixx

how can i play a sound when the contentChat.php is new.
How can i make a loading message?

What is in contentChat.php?

If you have a player in it and you want to ajax a simple song?

You should used Ajax & Jquery:

if (formdata) {  
    $.ajax({  
        url: "contentChat.php",  
        type: "POST",  
        data: formdata,  
        processData: true,  
        contentType: true,  
        success: function (i) {  
            document.getElementById("response").innerHTML = i;  
        }  
    });  
}  
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.