I have gotten it to work with onLoading rather than onCreate as per
the documentation:
onCreate is only available to responders, as it wouldn''t make a lot of
sense to individual requests: you do know when your code creates them,
don''t you?
Sheri
On Jun 10, 10:27 am, muskokee
<sherisa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Here is the script:
>
> function offerOptions() {
> var type = $F(''form_type'');
> var params = ''type='' + type;
> var url = ''myurl.com'';
> var ajax = new Ajax.Updater({success:
''type_return''},url,{onCreate:
> function() { new Effect.Appear(''loading'',{duration:
> 0.2,queue:''end''});}, onComplete: function()
> { if(Ajax.activeRequestCount == 0) { new
Effect.Fade(''loading'',
> {duration:0.2,queue:''end''});}}, method:
''post'', parameters:
> params});
> }
>
> No matter what I do...the loading image will not appear when using the
> oncreate and oncomplete within the updater.
>
> if i place them in a normal ajax responder they work like a charm, but
> my page is complex and i need more than one loading image location for
> the different calls.
>
> is there something i have missed with respect to adding oncreate and
> oncomplete to updaters?
>
> thanks!
> Sheri
> p.s. it also has no effect should i replace the Effect.Appear with
> Element.show etc.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---