You've declared what opt is--and it is not the updater, but the
options for the updater. You have not assigned the updater to a
variable.
Try something similar to:
var upd = new Ajax.PeriodicalUpdater('snmpResult','snmpsearch.php',{
method: 'post',
parameters: searchvar,
frequency: 1
});
TAG
On Nov 3, 2006, at 1:59 PM, [EMAIL PROTECTED] wrote:
>
> I hope you guys can help me on this. I have two functions. The first
> calls a periodical updater and does it quite successfully. The second
> is meant to stop said updater. It however fails when I call it. It
> just wont stop the updater. I'm sorry if I am missing something
> stupid.
>
> Thank you in advance,
>
> function foobar(){
> var searchvar = "ipadd=" + $F(ip) + "&commstring=" + $F(snmpstr) +
> "&snmpelem=" + $F(RSL);
> var opt = {
> method: 'post',
> parameters: searchvar,
> frequency: 1
> }
>
> new Ajax.PeriodicalUpdater('snmpResult','snmpsearch.php',opt);
>
> }
>
> function barbar(){
> opt.updater.options.onComplete = undefined;
> opt.stop();
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---