It seems to me that by using 'var liveStream' inside this function you  
are setting a new private variable rather than touching the existing  
public one. So while you may call stop on the bare variable  
liveStream, any further attempts to stop the actual running liveStream  
will fail, because that variable lives inside the context of the  
function.

Walter

On Mar 13, 2009, at 8:09 AM, flughund wrote:

> function livestart(lang,liveStream){
>       if(liveStream){
>               liveStream.stop();
>               liveStream = undefined;
>       }
>       var liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
> live.php?lang='+lang, { method: 'get', frequency: 5, decay: 2 });
> }


--~--~---------~--~----~------------~-------~--~----~
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