It's not a secret anymore!*
The moose likes JSP and the fly likes Modify DOM with AJAX for all sessions? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Modify DOM with AJAX for all sessions?" Watch "Modify DOM with AJAX for all sessions?" New topic
Author

Modify DOM with AJAX for all sessions?

Stamin Adrian
Ranch Hand

Joined: Dec 21, 2012
Posts: 34

Let's say some user comments on a page. With ajax I update the HTML to include the users comment. How can I update all of the users HTML currently watching the comment page? How is this done? I cound't really find anything useful.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61227
    
  66

Write the data to the database; have the pages occasionally poll looking for updated data.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Modify DOM with AJAX for all sessions?