Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by j.lagos on Apr 24, 2009 06:55
open dhtmlx forum
Grid with Ajax

I am trying to fill a Grid periodically (could take a whole day), but I cant decide what method of dhtmlx to use without overloading the browser, and to have the opportunity to pause/continue the process.

In other words, I'm trying to establish a two-way channel between Grid-Server, to maintain continues data flow, yet controllable.

I am wondering if I use Ajax, the Callback func is called from an async call (get/post) every time data (txt,xml) send or after the called php return (terminates) ?

Or, is there any alternative to this?

Thanks in advance,
JL


Answer posted on Apr 24, 2009 07:24
>>I am wondering if I use Ajax, the Callback func is called from an async cal
It will be called when connection closed ( after php return ) 

>>I'm trying to establish a two-way channel between Grid-Server
Browser has built in limitation on connection live time, so you wouldn't be able to use same connection longer that default timeout time ( about 5 minutes )
Default server side software also will not support such long live connections by default. 

More than that xmlHttpRequest object doesn't give any signals about data sending - so it is quite complicated to implement real constant link with server. 


>>I am trying to fill a Grid periodically
The only simple solution - is use setInterval and grid.load , it may have a small memory leak in IE, because it doesn't free used XML objects until page reloading. 
Alternatively you can check any of standalone "Comet" solution, which can be used as a separate transport system. 

Answer posted by j.lagos on Apr 24, 2009 07:29

Yes, it is complecated.

Thank you for your advises.

JL