Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  23] [ 5]  / answers: 1 / hits: 21161  / 11 Years ago, tue, july 16, 2013, 12:00:00

My requirement is to auto refresh a DIV every 5 seconds



The DIV content I want to refresh is



<div class=row-fluid>
<div class =span2>
<label><spring:message code='total.registration' />:</label>
</div>
<div class = span3>
${registrationStatusForm.totalRegis}
</div>
</div>


I also checked some questions on stackoverflow but didn't understand.
Please note that I'm using Spring Web MVC.
Please suggest.


More From » jquery

 Answers
181

You need to create a new view and controller with minimum elements required to be refreshed.



I also faced the same problem and I fixed it by writing a new controller and a view for the div to be refreshed and then used setInterval, actually setTimeout worked better for my requirement. :



setInterval(function(){
$('#your_div').load('newController');
}, time_interval);

[#76959] Monday, July 15, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jarettajb

Total Points: 678
Total Questions: 94
Total Answers: 90

Location: Guernsey
Member since Tue, Jul 6, 2021
3 Years ago
;