Thanks a lot Eric... it does exactly what I wanted in 3 lines of code
and the prototype library
Thanks again.
-----------------------------------------------Reply-----------------------------------------------
Well it would seem the sajax library that you originally used just did
an extra step of transforming a function in javascript to an ajax
request via a url to a function in php. That is, you call something
like update_time() in javascript and just get the result. But what
update_time() does in javascript is makes an ajax request to the sajax
hosting php file and calls the "get_time" function which it then
returns. Thus you're not really saving anything by trying to hide the
url thing. You may as well program as 80% of other people do and just
use a url. Feel free to wrap it in a function, although there's little
point.
And as Eric said, if you have more than a few users, updating every 1,
2, 3, 5, 10 seconds could soon put a lot of stress on your system. You
might consider something like comet (again as Eric said), where the
server actually sends new data to the client when and only when it is
available, rather than the client constantly polling the server,
although I'm unsure of how to implement this. I'm sure our good friend
Google knows, though.
Al
On Dec 14, 10:41 pm, "Aggelos" <djje@gmail.com> wrote:
> Just had it working using prototype and
> <script>
> new Ajax.PeriodicalUpdater("countSent", "test.php", {
> // initial number of seconds interval between calls
> frequency : 1,
> decay : 2});</script>
> Thanks a lot Eric... it does exactly what I wanted in 3 lines of code
> and the prototype library
> The only bad thing is that I have to link to a url and not the function
> directly though... Any ideas about that ?
> Thanks again.
hello Mr.alexrussell101
i'm a newbie in ajax and COMET, i want to learn about that,
where i can find a documentation about ajax and COMET..
thanx
-----------------------------------------------Reply-----------------------------------------------
hello
i'm a newbie in ajax and COMET, i want to learn about that,
where i can find a documentation about ajax and COMET..
thanx
-----------------------------------------------Reply-----------------------------------------------
On 15/12/06, jayz badboys <beagoodb@gmail.com> wrote:
> hello
> i'm a newbie in ajax and COMET, i want to learn about that,
> where i can find a documentation about ajax and COMET..
> thanx
I wanna know too !!!
-----------------------------------------------Reply-----------------------------------------------
Thanks for that. And what COMET does is exactly what I am looking.
Although I haven't heard of it.
I hope it is something I can learn fast though. The system at the
moment Will be used from a single user probably. But it will be used
from more in the near future...
SO I need to find some article which will explain how to implement it.
Thanks for pointing me in the right Direction Al ;)
-----------------------------------------------Reply-----------------------------------------------
> Thanks for pointing me in the right Direction Al ;)
That's okay, although Eric mentioned it first : )
> So I need to find some article which will explain how to implement it.
Well I don't use comet myself, so I don't know of any particularly good
articles, but I think I've read articles by the more famous Alex
Russell over at the dojo toolkit (
http://www.dojotoolkit.org/) on the
matter. Maybe the dojo toolkit has some comet built in to it. If you
can't find anything there, Google always has plenty to say on most
topics. Sorry I can't really be any more help.
Al
-----------------------------------------------Reply-----------------------------------------------
No probs Al.
I thanked Eric as well I think.
If not. THanks Eric.
I'll google it ;)