Re: [Proto-Scripty] Queues & Effects
i would rather use the AjaxUpdater and have a wrapping function over it : function ajaxUpdate(id, url, params, callback) { new Ajax.Updater (id, url, { parameters: params, onComplete: callback }); } then use the afterFinish callbacks of effects with use of curry function methods: $('information').fade({afterFinish: ajaxUpdate.curry('information', url, { zeitschrift_id: zeitschrift}, Element.appear.curry($('information')))}); On Thu, Apr 1, 2010 at 4:14 PM, C_B wrote: > Hi, > > i want to realize the following szenario: > > 1. fade div "information" > 2. change content of div "information" by using AJAX and innerhtml > 3. appear div "information" again > > Here is my version: > -- > $('information').fade({ > queue: 'end'}); > > new Ajax.Request(url, { >queue: 'end', >method: 'get', >parameters: { zeitschrift_id: zeitschrift}, >onComplete: function(require) {$ > ('information').innerHTML = require.responseText;}}); > > $('information').appear({ >queue: 'end'}); > > In fact, anything is still processed synchronous. Can you give me any > advice for solving my problem? > > > Thanks in advance! > > -- > 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-scriptacul...@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. > > -- 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-scriptacul...@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.
Re: [Proto-Scripty] Queues & Effects
Start with the Ajax.Request since that's likely to be the longest step. Then fade out the DIV, with a callback after the animation to set a "doneFading" flag to 1true`. The onComplete of the Ajax.Request should check if the doneFading flag is true, and if it is, update the innerHTML and fade it back in. If it's still fading out (with a fast latency), it should use setTimeout to keep polling the DIV until it's doneFading flag is true. Alex On Thu, Apr 1, 2010 at 10:14 AM, C_B wrote: > Hi, > > i want to realize the following szenario: > > 1. fade div "information" > 2. change content of div "information" by using AJAX and innerhtml > 3. appear div "information" again > > Here is my version: > -- > $('information').fade({ > queue: 'end'}); > > new Ajax.Request(url, { >queue: 'end', >method: 'get', >parameters: { zeitschrift_id: zeitschrift}, >onComplete: function(require) {$ > ('information').innerHTML = require.responseText;}}); > > $('information').appear({ >queue: 'end'}); > > In fact, anything is still processed synchronous. Can you give me any > advice for solving my problem? > > > Thanks in advance! > > -- > 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-scriptacul...@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. > > -- 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-scriptacul...@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.
[Proto-Scripty] Queues & Effects
Hi, i want to realize the following szenario: 1. fade div "information" 2. change content of div "information" by using AJAX and innerhtml 3. appear div "information" again Here is my version: -- $('information').fade({ queue: 'end'}); new Ajax.Request(url, { queue: 'end', method: 'get', parameters: { zeitschrift_id: zeitschrift}, onComplete: function(require) {$ ('information').innerHTML = require.responseText;}}); $('information').appear({ queue: 'end'}); In fact, anything is still processed synchronous. Can you give me any advice for solving my problem? Thanks in advance! -- 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-scriptacul...@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.