Refreshing JSP codes to check for data updates without refreshing the entire browser(eg. does not affect a user reading a article while constantly refreshing in the backgrd)
Posted on 2003-11-13
Hi.. I have a urgent question. Basically I have this site written in JSP that allows one computer to send a "instant message" to another computer(both at a specific webpage of my site). The message sent is first stored in a vector/file/db and then retrieved when computer B(reciever) refreshes the page and the codes check that boolean newMsg=true; and displays the message in a Alert box.
My problem is, the reciever has to manually click refresh to check for any new messages. What I need is for the "refresh" to somehow.. run (in the background?) without disturbing the reciever(perhaps reading a article). And when a new message is detected, the Alert box will pop up.
Hope I make this clear enough. Please help! Thanks!