You can't really actively "send" information from the server to the client, 
unless there is some kind of connection established. Normal http connects, 
reads or writes and disconnects, but a browser doesn't maintain any kind of 
connection to the server.
That said, what I would probably do is calculate a MD5 sum over the "data" on 
the server side. Every time there is a change made by someone I'd update that 
MD5 sum. Then I'd use a normal timer on the client side and fetch that MD5 
sum  every x minutes.  If the checksum changed versus the last reload you 
then could either do a reload or an ajax call to just fetch the data and 
repopulate the table.

Just a thought...

Uwe


On Friday 05 October 2007, onmountain wrote:
> Hi. I have a simple data model of an in and out board for people to
> mark themselves when they leave work, etc. I have it in an html table
> dynamically, and then I have some Ajax running now that sorts the
> table and also has edit buttons for the in/out status field. This is
> my learning project and so far TG and Ajax rock!!!!
>
> What I can't seem to find in any of my Ajax books or online (at least
> with a complete working example) is how to implement a data refresh in
> Ajax.  When someone updates their in/out status I want that change to
> appear (some lag ok) on all other open in/out screen.  Of course, I
> could do a page refresh, but that would defeat the purpose of what I
> am trying to do learning TG and Ajax :-)
>
> I have two "ideas" -
> 1) a simple timer of some kind on client that would do some sort of
> reload of data back into the table - seems like extra traffic
> generated even if no changes made
> 2) client side waiting for signal from TG that there has been an
> actual change, requiring a reload - no change unless actual data
> changes
>
> Any suggestions or even leads would be appreciated
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to