Ajax periodic refresh question

Just wondering if anyone knew hoe to do this.

 

If you set up a timer to load content into a div at predetermined intervals, is it possible to temporarily stop refreshing content if a condition textarea:onFocus exists, then continue refreshing content when the condition textarea:onBlur occurs.

 

For instance, the code below is a jquery auto refresh that will load the file 'response.php' into the div #responsecontainer every 10 seconds.  Suppose response.php has a text area that you must type in and submit, but you don't want the div to refresh while you are typing.  Is there a way to use a textarea:onFocus to temporarily stop the auto refresh?

 

<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
var refreshId = setInterval(function()
{
$('#responsecontainer').fadeOut("slow").load('response.php').fadeIn("slow");
}, 10000);
</script>
</head>
<body>
<div id="responsecontainer">
</div>
</body>

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 4 Nov 2010

I'm not even going to venture a guess, as to why each individual line got wrapped with the code class.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 4 Nov 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.