Hi DH,

Thanks for your quick reply.

In the onComplete function is there any way to find out which request is
actually complete.  As there could be many at the same time.  The reason I
want to know this is so that I can hide the correct spinner.

I want to have a spinner next to each 'Add to Order' link.  So next to each
link there will be a div with a unique id containing the spinner gif.  This
will initially be hidden and i can use the onClick event to make this div
visible when the 'Add to Order' link is clicked,
$('add_to_order_link_1_spinner').show();

In the onComplete function (in the code you provided) how can i figure out
which request is complete, so i can then figure out what button was actually
clicked in the first place, so i can work out what spinner to hide.

I hope this makes sense.  It would be great if you or someone else could
come up with a solution or point me in the right direction.

Cheers,
Daniel


DH-14 wrote:
> 
> I think what you need is prototype's global ajax responser register.
> 
> Ajax.Responders.register(
> {
>  onCreate: function() {
>   // ajax request is sent
>   }
> 
>  },
>  onComplete: function() {
>   // ajax response is back. 
>  }
> })
> 
> DH
> 

-- 
View this message in context: 
http://www.nabble.com/AJAX-Loading-Spinner-tp24241153p24256052.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to