AJAX - Asynkron Event
HejJeg har formuleret mit spørgsmål på engelsk i et andet forum, hvor jeg ikke fik et tilfredsstillende svar. Derfor er resten af indlægget på engelsk; jeg håber det er i orden.
To illustrate my problem I made the following example:
I have a database that contains information about "Patients".
I also have two pages, one that alters patient data (page A) and one that displays patient data (page B). If the patient data is altered on "page A" while it is being viewed on page B, the information being viewed on "page B" will be outdated until a new request is made to the server.
-----------------
My question is, how do I asynchronously update the content on "page B" to secure it from being outdated? I believe one way is to make a timer and attach an ontick event, which will trigger an "asynchronous post back event" within a specified interval. However this solution doesn't seem very elegant, so I was wondering if there is a smarter and more correct way of updating "page B" whenever the content being displayed has been altered in the database?
Any help in form of hints, clues, explanations or anything really will be greatly appreciated. Please also keep in mind I have barely scratched the surface of AJAX, so be gentle