aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to dynamically refresh a webpage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to dynamically refresh a webpage" Watch "How to dynamically refresh a webpage" New topic
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
Sheriff

Joined: Oct 01, 2001
Posts: 2771
    
  10

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: 60050
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to dynamically refresh a webpage
 
Similar Threads
how to refresh the dispaly in Swing
JARS are visible threrough RAD 7.0
How can a page refresh automatically?
Help!How to refresh view
Upload attachment to QC [Quality Center] using java