I'm not sure if this is exactly relevant to what your problem is
here, but in cases where I want to have access to current values
while running a periodical update, I've had to resort to using
PeriodicalExecuter and a separate function rather than the magical
Ajax.PeriodicalUpdater. It isn't that much harder, but it does make
it impossible to take advantage of the decay feature (unless you
write your own).
var pollChat = function(){
new Ajax.Updater($('posts').down('table'),'chat.php',{
parameters:{
latest:$F('latest'),
user:$F('user')
},
insertion:'bottom',
evalScripts:true,
onComplete:fixScroll
});
}
$('posts').update('<table cellspacing="0"></table>');
pollChat();
$('message').observe('focus',getUser);
$('message').activate();
new PeriodicalExecuter(pollChat,3);
Walter
On Nov 5, 2008, at 10:58 AM, James Hoddinott wrote:
>
> 2008/11/5 Alex Mcauley <[EMAIL PROTECTED]>:
>> does firebug report any error at all ...
>
> Not a thing.
>
>> you could also try to evalJs in the options and put the invoke
>> inside the
>> serverside script to see if its being fired there or not
>
> Yes I tried this but still no joy. By adding an alert() to the
> onSuccess function I was able to see that the function does get called
> but I think it still stalls on the invoke line.
>
> I have now just noticed this in the documentation for
> PeriodicalUpdater:
>
> "Ajax.PeriodicalUpdater is not a specialization of Ajax.Updater,
> despite its name. When using it, do not expect to be able to use
> methods normally provided by Ajax.Request and "inherited" by
> Ajax.Updater, such as evalJSON or getHeader. Also the onComplete
> callback is hijacked to be used for update management, so if you
> wish to be notified of every successful request, use onSuccess
> instead (beware: it will get called before the update is
> performed)."
>
> which, if I'm not mistaken, would suggest the root of my problem,
> namely that the 'li.clickinc' elements just aren't available to be
> observed at the time. So I thought I'd run the same thing through an
> Ajax.Updater call but that also didn't work.
>
> --
> James Hoddinott
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---