DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Refresh the page to all in the site on click (http://www.daniweb.com/forums/thread166881.html)

trevata Jan 7th, 2009 6:45 pm
Refresh the page to all in the site on click
 
Hi there!
Is there a way to refresh the page to all users when one of them clicks on a button like in Cent Auctions ?
For example:
There is a button refresh and when I click it the page refreshes to all...

essential Jan 7th, 2009 7:59 pm
Re: Refresh the page to all in the site on click
 
I really don't understand what you are trying to achieve here!
But you can refresh the page with this bits of code:
<input type="button" value="refresh" onclick="window.location.reload();" />

trevata Jan 8th, 2009 4:26 am
Re: Refresh the page to all in the site on click
 
I'll try to explain it.
We have a button "Refresh" (For example), when someone clicks that button the page refreshes but not only to him, but to all users on that page. Is that more cler ?

essential Jan 8th, 2009 11:55 am
Re: Refresh the page to all in the site on click
 
Try this one instead
<input type="button" value="refresh" onclick="window.opener.refresh();" />
to note that this will only work with windows that are in the same domain...

fatihpiristine Jan 13th, 2009 8:06 pm
Re: Refresh the page to all in the site on click
 
try to send a http request to server periodically and check the version number. if the version on client side less then the server side, refresh the page... dont forget to increase the version each time.


All times are GMT -4. The time now is 2:29 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC