Hi,

Assuming you are calling livestart() at some point, you're creating
two PeriodicalExecuters [one at initialization time and another in
livestart()].  The second one overwrites the reference to the first,
so if you later call langChange(), my guess is that you are succeeding
in stopping the second one; the first one continues.

FWIW, you're also ignoring the 'lang' parameter in livestart().

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Mar 7, 8:39 pm, fruehjahr <fruehj...@gmail.com> wrote:
> Yes, I searched right here and @ Google for a solution. But I spent
> now over an hour with debugging and I can't find the solution. Please
> help!
>
> Ok, here's my script:
>
> var     liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
> live.php?lang=all', { method: 'get', frequency: 5, decay: 2 });
>
> function livestart(lang){
>         var liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
> live.php?lang=all', { method: 'get', frequency: 5, decay: 2 });
>
> }
>
> function langChange(lang){
>         liveStream .stop();
>         liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/live.php?
> lang='+lang, { method: 'get', frequency: 5, decay: 2 });
>
> }
>
> But stop() won't stop!
--~--~---------~--~----~------------~-------~--~----~
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to