T
Todd Anderson
I have a live support script that uses setTimeout to refresh the page so
that users will see new postings as they are added.
But the refresh makes it hard to type new text in as when the page
refreshes the text you're typing is lost.
So i have a javascript that when you place your cursor in the text field
it resets the setTimeout to a longer refresh, but it's not resetting it.
Any help is appreciated and thanks in advance.
<SCRIPT LANGUAGE="Javascript">
<!--
function disable_refresh()
{
window.setTimeout("location.href='MY.html'",100000000)
}
function refresh()
{
window.setTimeout("location.href='MY.html'",10000)
}
//-->
</SCRIPT>
<BODY onLoad="refresh()"> THIS SETS THE REFRESH RATE
<input type="text" name="question" size="50"
onkeyup="javascript:disable_refresh()" > THIS DISABLES THE REFRESH OR
MAKES IT LONGER
that users will see new postings as they are added.
But the refresh makes it hard to type new text in as when the page
refreshes the text you're typing is lost.
So i have a javascript that when you place your cursor in the text field
it resets the setTimeout to a longer refresh, but it's not resetting it.
Any help is appreciated and thanks in advance.
<SCRIPT LANGUAGE="Javascript">
<!--
function disable_refresh()
{
window.setTimeout("location.href='MY.html'",100000000)
}
function refresh()
{
window.setTimeout("location.href='MY.html'",10000)
}
//-->
</SCRIPT>
<BODY onLoad="refresh()"> THIS SETS THE REFRESH RATE
<input type="text" name="question" size="50"
onkeyup="javascript:disable_refresh()" > THIS DISABLES THE REFRESH OR
MAKES IT LONGER