> I would like to override this behavior to display the div only when an
> ajax call takes more than 2 seconds for example to be executed. So for
> a little ajax call less than 2 seconds, I would like that nothing
> appears.

If you set the div initially invisible (display: none) you can add Javascript 
that triggers when the request is made with a two second timer (setTimeout) 
that then shows it, then in the Ajax response you cancel the timer.

e.g. in you AjaxCallDecorator.decorateScript():

return "var f = function() { getElementById('xxx').style.display='block' }; 
window.my_ajax_feedback = setTimeout(f, 2000);" + script;

and in the response you prepend

clearTimeout(window.my_ajax_feedback);

- Tor Iver

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to