I have a Html page that generates (again) every 3 seconds and exposes users to these changes is required. / P>
Since I can not change the generator to write a different format (JSN) and read using AJAX, we just have a javascript that refreshes the whole page every 10 seconds.
Ideally, instead of refreshing the whole page, what I want to do is just refresh those areas that have changed
The structure of the page never changes, only the value of table cells . Each table cell has a different class name.
Ex:
The basic HTML running in the user's browser includes:
& lt; Html & gt; & Lt; Body & gt; & Lt; Div class = "first die" & gt; 1000 & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
After 3 seconds it changes to the server:
& lt; Html & gt; & Lt; Body & gt; & Lt; Div class = "firstdiv" & gt; 2000 & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
A javascript will be read through AJAX every 3 seconds changed HTML, calculate the difference and only the user whose browser has already been opened in the browser, using Javascript:
$ ('firstdiv.') HTML ('2000).
So my question is: Is there a device / library that can help me with this task?
No comments:
Post a Comment