jadenPete jadenPete - 4 months ago 15
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

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>

Comments