HighDots Forums  

Binding XML-RPC data to tables

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Binding XML-RPC data to tables in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FunGuySF
 
Posts: n/a

Default Binding XML-RPC data to tables - 01-13-2005 , 05:34 PM






I've created an XML-RPC server, and would like to somehow bind the XML
server responses to a table for users to view. Here's the catch, that data
changes frequently (every few seconds), so I'm using setInterval to
periodically get updated XML content from the server.

Currently, the setInterval function requests the entire dataset, then
rewrites the entire table. I'm concerned that it's a waste of bandwidth,
and disrupts the user scrolling through the data whenever it rewrites.
Ideally, I'll have the XML-RPC server generate only data changed since the
last request, then somehow update the table with the changes.

Anyone do anything like this before? Thoughts on how to accomplish it?

Thanks!



Reply With Quote
  #2  
Old   
BMR
 
Posts: n/a

Default Re: Binding XML-RPC data to tables - 01-18-2005 , 12:41 AM






FunGuySF a écrit :
Quote:
I've created an XML-RPC server, and would like to somehow bind the XML
server responses to a table for users to view. Here's the catch, that data
changes frequently (every few seconds), so I'm using setInterval to
periodically get updated XML content from the server.

Currently, the setInterval function requests the entire dataset, then
rewrites the entire table. I'm concerned that it's a waste of bandwidth,
and disrupts the user scrolling through the data whenever it rewrites.
Ideally, I'll have the XML-RPC server generate only data changed since the
last request, then somehow update the table with the changes.

Anyone do anything like this before? Thoughts on how to accomplish it?

Thanks!


Why not use setInterval along with DOM functions that would just change
necessary cells content in the table ?

BMR


Reply With Quote
  #3  
Old   
FunGuySF
 
Posts: n/a

Default Re: Binding XML-RPC data to tables - 01-18-2005 , 01:31 AM



"BMR" wrote in message

Quote:
Why not use setInterval along with DOM functions that would just change
necessary cells content in the table ?
That sounds like a winner... I'm just not sure how to go about it.

I imagine that I'd have to send, for example, some key data to the server,
so it knows what I have, then have it return any changes (adds, removes,
changes).

Then, I'm assuming I can use DOM features to search my own table to see what
should be updated? Where can I find specifics on methods I could use?

Thanks!






Reply With Quote
  #4  
Old   
Matthew Lock
 
Posts: n/a

Default Re: Binding XML-RPC data to tables - 01-19-2005 , 07:09 PM



Just off the top of my head you could have the client send back the
date and time of the last time it received a table update, and then
have the server compare this against the the date and time some data
changed, and if it was newer to send the data up to the client.

As for the DOM you could either iterate through the rows and cells of
the table replacing as needed, or ad id's to each cell and replace
directly.

That ought to get you started anyway.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.