I'm fairly new to HTML, PHP, CSS and Javascript. I do have a bit of a background in C++ if that means anything. To practise my website programming, I decided to make a website with a simple sort of chat room. Basically, users log into the site, and when they enter a message into the 'chat room' (by typing in the text field and clicking the submit button), the message is appeneded to ChatData.txt. Then ChatData.txt is read and displayed in an iframe. The iframe only displays the chat data and is refreshed every 5 seconds. This is all done using PHP and HTML.
What I would like to know is, is it possible to, instead of refreshing the iframe every 5 seconds, force all the clients to refresh the iframe only when the submit button is clicked?
I was thinking that somehow there'd be a way to send a refresh to all the browsers using PHP/Javascript.
Thanks.