Thanks to all, think I fixed this.

On Jun 4, 6:13 pm, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote:
> You can call .stop() on your periodical updater object once you've created
> it.  Just have to save it away....
>
> var updater = new Ajax.PeriodicalUpdater(...);
> if (someCondition) updater.stop();
>
> Different issue - what the OP posted doesn't involve a PeriodicalUpdater.
>
> On Wed, Jun 4, 2008 at 12:07 PM, voracious_reader <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > I have the same issue. I'm using Ajax.PeriodicalUpdater. I want to
> > stop making calls based on condition. How do I do it?
>
> > On Jun 4, 8:42 am, "Frederick Polgardy" <[EMAIL PROTECTED]> wrote:
> > > I can't think of any reason why you're seeing this.  Can you post a
> > complete
> > > page that demonstrates this?  You might be calling form_db() over and
> > over
> > > and not realizing it. Hard to tell.
>
> > > On Wed, Jun 4, 2008 at 4:37 AM, sheps-ii <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > Hi,
> > > > I'm new to prototype and am having a problem with Ajax.Request. I find
> > > > that it basically just loops round and round and round forever, and
> > > > never finishes.
>
> > > > // uses ajax to attempt to connect to a database. Inserts either yes
> > > > or no into error div
> > > > function form_db(server, username, password, name)
> > > > {
> > > >  //alert('hi');
> > > >  new Ajax.Request('ajax_handler.php',
> > > >  {
> > > >    method:'get',
> > > >    onSuccess: function(transport){
> > > >      var response = transport.responseText || "no response text";
> > > >      alert("Success! \n\n" + response);
> > > >    },
> > > >    onFailure: function(){ alert('Something went wrong...') }
> > > >  });
>
> > > > }
>
> > > > This just constantly alerts "success + " the correct response from
> > > > php, but it alerts again and again and again and never stops! If I
> > > > comment out the prototype code and uncomment alert('hi'), that only
> > > > alerts once so it must be a problem with the prototype usage. Could
> > > > someone explain to me how to get it to just do one request then
> > > > finish?
>
> > > > Thanks,
> > > > Simon
>
> > > --
> > > Science answers questions; philosophy questions answers.
>
> --
> Science answers questions; philosophy questions answers.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-spinoffs@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to