That's a pretty old article and bug, from over a year and a major
version ago. As far as I know, you can't change a PU mid-stream, and I
also fight with it from time to time to try to get it to live-update
any variables, but that seems to run counter to how it works.
What you can do is kill it and start another one, which is what I
thought you were doing here. Try leaving off the var part inside your
function and see if it does what you expect then. While you're at it,
take the liveStream out of your function signature, so you are
explicitly reading and modifying the "one true" liveStream from the
global space.
var liveStream; //sets a global variable, available everywhere
function livestart(lang){
if(liveStream && liveStream.stop){ //kills the global if it's set
liveStream.stop();
liveStream = undefined;
}
//now set the global to a new instance of PU
liveStream = new Ajax.PeriodicalUpdater('live_buehne', '/inc/
live.php?lang='+lang, { method: 'get', frequency: 5, decay: 2 });
}
Walter
On Mar 13, 2009, at 8:45 AM, flughund wrote:
>
> hm, ok. But how can I change a runnig PUpdaters options?
> Is there a better way?
>
>
> btw: http://osdir.com/ml/lang.ruby.rails.spinoffs/2006-07/
> msg00269.html
> I don't understand the article, but maybe...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---