Re: [Proto-Scripty] ajax.updater and onLoad

2010-11-02 Thread Walter Lee Davis

If you just want it for one updater, then do this:

new Ajax.Updater('foo','bar.php', {
onCreate: function(){
$('indicator').show();
},
onComplete: function(){
$('indicator').hide();
}
});

Another trick I like is this one:

new Ajax.Updater('foo','bar.php', {
onCreate: function(){
		$('foo').update('alt="wait" />');

}
});

That way your update naturally wipes away the indicator, and you don't  
have to manage another image in your layout.


If you want it for all the Ajax on your page, have a look at the  
Prototype docs for the bit on Ajax.Responders. There's a nice recipe  
there to show a global Wait indicator that comes and goes as any Ajax  
on your entire page runs. I do this with a lightbox-style overlay on  
the page, makes a nice effect and keeps the stray extra clicks from  
happening, which was a big problem with this page.


Walter

On Nov 2, 2010, at 3:57 PM, Martín Marqués wrote:


I'm tryng to find a way for ajax.updater to show an animated gif clock
during the load of the request, but can't find it, and I don't want to
rewrite all the scripts with ajax.request. I thought I saw it in the
past, but can't recall where. Any ideas?

--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

--
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 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] ajax.updater and onLoad

2010-11-02 Thread Martín Marqués
I'm tryng to find a way for ajax.updater to show an animated gif clock
during the load of the request, but can't find it, and I don't want to
rewrite all the scripts with ajax.request. I thought I saw it in the
past, but can't recall where. Any ideas?

-- 
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador

-- 
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.