jadenPete jadenPete - 1 year ago 154
Javascript Question

PHP - Update iFrame When A New Message is Recieved

I'm kind of a newbie at PHP. I made a messaging system, but you have to manually update the iFrame with the messages. How can I make this iFrame update when a new message is received?

Answer Source

Thanks everybody! Here's what I did (I borrowed it from http://code.tutsplus.com/tutorials/how-to-create-a-simple-web-based-chat-application--net-5931, suggested by chris85:

<script>setInterval(function(){document.getElementById("messages").src += "";}, 2000);</script>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download