| Author |
How to dynamically refresh a webpage
|
Akshay Jain
Greenhorn
Joined: Dec 29, 2011
Posts: 5
|
|
Hello
If a website has pages A and B, and someone presses a button A, how do you update/refresh all existing page B still connected to the server.
Thanks in Advance.
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2550
|
|
|
Do you mean pages A and B are opened in two separate windows (or tabs) and you want page B to refresh after a button on page A is clicked?
|
 |
Akshay Jain
Greenhorn
Joined: Dec 29, 2011
Posts: 5
|
|
|
yes; however, if page B is open in many different windows/tabs, and someone presses the button on page A, i want all of the windows/tabs where page B is open to refresh
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56521
|
|
Are they independent windows? Or were they all opened from the same parent using window.open()?
If the former, you're out of luck. You'll need to have the pages poll the server (via Ajax most likely) to see if there's a change of state that should trigger a refresh.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Akshay Jain
Greenhorn
Joined: Dec 29, 2011
Posts: 5
|
|
|
Its the former(they are independent windows)....do you mean that i would have to use php to check the server every few seconds for new information? or is there another way to do it....
|
 |
 |
|
|
subject: How to dynamically refresh a webpage
|
|
|