you're right, data doesn't get merged by using the updater. my problem
is that the data get merged in a div while a user clicks and activates
an update during page load, if so data get merged.

how can I fix this quick without rewriting a lot of scripts ... I'm
not using on dom:loaded...so I'm looking for a way to implement this
in the function below. any hint would be helpful.

function update(id,url) {
  if($(id)) {
    new Ajax.Updater(id,url,{
           asynchronous:true,
           evalScripts:true,
           onFailure: function(obj) {$(id).update
('<center><strong>error...<strong></center>');   }
   });
  }
}

On Dec 1, 3:09 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> > so what I'm looking for is a way to wait or halt the second request
> > until the first one is finished...
>
> Lots of ways to do that.  You could maintain a queue, etc.  Prototype
> maintains a count of active Ajax requests in Ajax.activeRequestCount
> [1], you could query that before launching the second request.
>
> [1]http://www.prototypejs.org/api/ajax/responders
>
> But what I'm not getting is the merging:  Ajax.Updater *updates*, it
> doesn't merge, unless you specify an insertion.
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Dec 1, 2:01 pm, Stucture_Ulf <[EMAIL PROTECTED]>
> wrote:
>
> > the problem here is that if i run a second updater, targeted on the
> > same div as the first one and before the first one is complete...the
> > result of the second gets on top of the first request. i do not want
> > to merge the data, only display the latest updater.
>
> > so what I'm looking for is a way to wait or halt the second request
> > until the first one is finished or kill the first one when the second
> > gets activated.
>
> > On Nov 30, 11:33 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > Not immediately seeing a problem, can you create a complete page that
> > > demonstrates what you're seeing?
> > > --
> > > T.J. Crowder
> > > tj / crowder softare / com
>
> > > On Nov 30, 8:07 pm, Stucture_Ulf <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > thanks for your answer. here is a short code snippet i'm using. i do
> > > > not want to place the second call on top or under the first content, i
> > > > just want to make sure the second request stop the first one so that
> > > > only the content from the second updater get's displayed.
>
> > > > function update(id,url) {
> > > >   if($(id)) {
> > > >     new Ajax.Updater(id,url,{
> > > >            asynchronous:true,
> > > >            evalScripts:true,
> > > >            onFailure: function(obj) {$(id).update
> > > > ('<center><strong>error...<strong></center>');   }
> > > >    });
> > > >   }
>
> > > > }
>
> > > > On Nov 30, 10:47 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi,
>
> > > > > I assume you're not using the "insertion" option on your Ajax.Updater
> > > > > calls[1]?  If so, there's your answer.  If not, can you put together a
> > > > > small, self-contained example that demonstrates the prblem?
>
> > > > > [1]http://www.prototypejs.org/api/ajax/updater
>
> > > > > HTH,
> > > > > --
> > > > > T.J. Crowder
> > > > > tj / crowder software / com
>
> > > > > On Nov 27, 11:10 am, Stucture_Ulf <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > hi all!
>
> > > > > > i have a problem with Ajax.updater.
>
> > > > > > When i run the Ajax.updater in one div and then if a user clicks on
> > > > > > link and activates another Ajax.updater in the same div before the
> > > > > > first one is finished the data get merged in the same div. The top 
> > > > > > is
> > > > > > showing the new content, underneath is showing the data that was not
> > > > > > yet loaded from the first call.
>
> > > > > > how can I fix this? can i stop/kill the first updater before running
> > > > > > the second one? or should i wait until the first is finished before
> > > > > > triggering the next one...and how do I do that?
>
> > > > > > grateful for help and advice
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to