On Wed, Mar 4, 2009 at 2:42 PM, David Mintz wrote:
>
>
>
>
>>
>>
>> I don't think your code is quite right. To validate polling code,
>> just add "sleep(2)" to your php code, and set the updateInterval to 1
>> second. If it doesn't work under these conditions, then the code is
>> not quite rig
Hola David:
On Wed, Mar 04, 2009 at 10:49:01AM -0500, David Mintz wrote:
> I've got users working collaboratively all day long on a set of database
> records. The view in front of them is frequently stale.
There are many ways to do this, as this thread shows. The best option
depends on exactly
On Wed, Mar 4, 2009 at 2:42 PM, David Mintz wrote:
>
>
>
>
> In any case, the updateInterval is currently 5000 milliseconds. I just want
> to make sure their snapshot never gets more than five minutes old.
>
Ouch, did I say 5000 when I meant 30 ?
--
David Mintz
http://davidmintz.org/
Th
On Wed, Mar 4, 2009 at 2:53 PM, Jesse Callaway wrote:
> On Wed, Mar 4, 2009 at 1:07 PM, David Mintz wrote:
> >
> > On Wed, Mar 4, 2009 at 12:17 PM, John Campbell
> wrote:
> >>
> >> >> Use AJAX instead to refresh just the part of the page that needs
> >> >> refreshing. If it's a fair chunk of in
On Wed, Mar 4, 2009 at 1:07 PM, David Mintz wrote:
>
> On Wed, Mar 4, 2009 at 12:17 PM, John Campbell wrote:
>>
>> >> Use AJAX instead to refresh just the part of the page that needs
>> >> refreshing. If it's a fair chunk of information, you set a "version"
>> >> on the server so the AJAX call ju
On Wed, Mar 4, 2009 at 1:30 PM, John Campbell wrote:
> On Wed, Mar 4, 2009 at 12:48 PM, David Mintz wrote:
> > // on load
> >
> > window.updater = window.setInterval(submitForm,updateInterval);
> >
> > // and...
> >
> > submitForm = function(){
> >
> > $('searchForm').request({
> >
> onCre
On Wed, Mar 4, 2009 at 12:48 PM, David Mintz wrote:
> // on load
>
> window.updater = window.setInterval(submitForm,updateInterval);
>
> // and...
>
> submitForm = function(){
>
> $('searchForm').request({
>
> onCreate:function(response){$('formSubmit').value="Processin
David Mintz wrote:
The users are looking at a set of database rows. The table does have
last-modified and creation-datetime columns. Saving the current set's
maximum last-update and/or created value in the client, and then
checking against the server by running an Ajax request to a
server-sid
On Wed, Mar 4, 2009 at 12:45 PM, Rolan Yang wrote:
> John Campbell wrote:
>
>> On Wed, Mar 4, 2009 at 12:10 PM, David Mintz
>> wrote:
>> The problem is with intervals, is that if someone's connection flakes
>> out for a minute or two, you end up doing tons of ajax calls that all
>> overlap caus
David Mintz wrote:
I have a page where I *think* I am doing that albeit in a roundabout
way. When the document loads initially I set the timer. When the xhr
completes, my xhr callback resets the timer.
Yes, that's what I was thinking (and what I'm doing). If the connection
fails, the xhr ca
On Wed, Mar 4, 2009 at 12:17 PM, John Campbell wrote:
> >> Use AJAX instead to refresh just the part of the page that needs
> >> refreshing. If it's a fair chunk of information, you set a "version"
> >> on the server so the AJAX call just checks the current version vs it's
> >> version. If it's d
On Wed, Mar 4, 2009 at 12:26 PM, John Campbell wrote:
> On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote:
> >
> > On Wed, Mar 4, 2009 at 12:01 PM, David Mintz
> wrote:
> >>>
> >> Thanks for the tip, but... why is this so?
> >>
> >
> > Cancel that, I think
> >
> http://blog.paulbonser.com/2007
John Campbell wrote:
On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote:
The problem is with intervals, is that if someone's connection flakes
out for a minute or two, you end up doing tons of ajax calls that all
overlap causing wacky behavior. The point of tail recursion is to
wait for the
On Wed, 4 Mar 2009, David Mintz wrote:
> I've got users working collaboratively all day long on a set of database
> records. The view in front of them is frequently stale. A common old Web 1.0
> approach to solve this was to reload the page automatically every n seconds
> with a meta refresh. Nowa
On Wed, Mar 4, 2009 at 12:10 PM, David Mintz wrote:
>
> On Wed, Mar 4, 2009 at 12:01 PM, David Mintz wrote:
>>>
>> Thanks for the tip, but... why is this so?
>>
>
> Cancel that, I think
> http://blog.paulbonser.com/2007/11/18/extending-javascript-tail-recursion/
> is trying to help me out on this
On Wed, Mar 4, 2009 at 11:53 AM, David Mintz wrote:
>
>
> On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote:
>>
>> Use AJAX instead to refresh just the part of the page that needs
>> refreshing. If it's a fair chunk of information, you set a "version"
>> on the server so the AJAX call just che
On Wed, Mar 4, 2009 at 11:53 AM, David Mintz wrote:
>
>
> On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote:
>>
>> Use AJAX instead to refresh just the part of the page that needs
>> refreshing. If it's a fair chunk of information, you set a "version"
>> on the server so the AJAX call just che
On Wed, Mar 4, 2009 at 12:01 PM, David Mintz wrote:
> Writing an ajax polling loop is really quite simple... just make sure
>> you use tail recursion, rather than an interval. I have made that
>> mistake in the past, and it hurts.
>>
>
>
> Thanks for the tip, but... why is this so?
>
>
Cance
On Wed, Mar 4, 2009 at 11:50 AM, John Campbell wrote:
> I use AJAX polling loops to check if the data is actually stale, and
> then do something about it.
Again, sorry for being dense but I am not sure I understand how this
checking should be performed.
I can imagine possibilities, some of wh
On Wed, Mar 4, 2009 at 11:34 AM, Brent Baisley wrote:
> Use AJAX instead to refresh just the part of the page that needs
> refreshing. If it's a fair chunk of information, you set a "version"
> on the server so the AJAX call just checks the current version vs it's
> version. If it's different, th
On Wed, Mar 4, 2009 at 10:49 AM, David Mintz wrote:
>
> I've got users working collaboratively all day long on a set of database
> records. The view in front of them is frequently stale. A common old Web 1.0
> approach to solve this was to reload the page automatically every n seconds
> with a met
I use AJAX polling loops to check if the data is actually stale, and
then do something about it. It can be complicated as auto updating
the sections of the page that have changed, and then doing the
"yellow-fade". If you don't want to get fancy, you could just show a
dialogue that let's the user
On Wed, Mar 4, 2009 at 10:49 AM, David Mintz wrote:
>
> I've got users working collaboratively all day long on a set of database
> records. The view in front of them is frequently stale. A common old Web 1.0
> approach to solve this was to reload the page automatically every n seconds
> with a met
Use AJAX instead to refresh just the part of the page that needs
refreshing. If it's a fair chunk of information, you set a "version"
on the server so the AJAX call just checks the current version vs it's
version. If it's different, then you refresh the content. If it's not
different, no need to re
I've got users working collaboratively all day long on a set of database
records. The view in front of them is frequently stale. A common old Web 1.0
approach to solve this was to reload the page automatically every n seconds
with a meta refresh. Nowadays we have xhr. Either way, my concern is as t
25 matches
Mail list logo