Ejemplo de Ajax.Responders (Prototype)


/ Published in: JavaScript
Save to your folder(s)

Ejemplo de cómo utilizar el objeto Ajax.Responders de Prototype.

El ejemplo hace uso de Scriptaculous.


Copy this code and paste it in your HTML
  1. Ajax.Responders.register({
  2. onCreate: function() {
  3. if($('notification') && Ajax.activeRequestCount > 0)
  4. //Se muestra una capa con Scriptaculous
  5. Effect.Appear('notification',{duration: 0.25, queue: 'end'});
  6. },
  7. onComplete: function() {
  8. if($('notification') && Ajax.activeRequestCount == 0)
  9. //Se oculta una capa con Scriptaculous
  10. Effect.Fade('notification',{duration: 0.25, queue: 'end'});
  11. }
  12. });

URL: http://www.gen-x-design.com/demos/activity_indicator/responder.js

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.