sallam
Jun 1 2005, 12:17 PM
Greetings
I'm trying to setup a forum in my board to be used like chatting. Posting as usual, but the page reloads every 10 sec. so that reading new posts is always updated. I'll use this forum for scheduled interviews and meetings.
I'm using a skin thats dedicated for that forum, and a simple refresh meta tag in the global header.
The problem is that if someone if typing to post, in the quick reply box, and the page gets refreshed automatically, the typed text may be lost, and its annoying users.
Is there a way to stop the refresh when someone is typing?
For example, a javascript to use, instead of a refresh meta tag, that controls when to refresh and when not to?
.Jack
Jun 3 2005, 03:17 PM
Yeh.. you could do that.. Are you planning to integrate this into IPB?
Anyway.. Roughly what you would do is something like:
CODE
<script>
function doReload(){
var typingBox = document.form1.textarea.value;
if (!typingBox){
window.location.reload();
}
setTimeout('doReload()', 10000);
}
setTimeout('doReload()', 10000);
</script>
Haven't tested but it should work...
sallam
Jun 3 2005, 08:58 PM
Thanks JCXP, and yes, its for IPB
Where should I paste your code above? in the skin wrapper?
and does it go betweeb the HEAD tags or the BODY tags?
One more question, do I replace the word 'form1' with 'REPLIER'?
.Jack
Jun 3 2005, 09:07 PM
well form1 and textarea will need to be replaced with the form name and name of the textbox ... look in the html for these
And put it in the head