April 15, 2012
Ajax loader div in zend framework
Question by KJA
through my application I use common Ajax loader Div, i show it always when i make an ajax request
submitHandler: function(form) {
$('#loader').show();
$(form).ajaxSubmit({
type: 'POST',
url: "/exampleactions/example",
data:{
},
success: function(response_data){
$('#loader').hide();
where is the best place to put this div to use it every where ?
shall i put it layout.php ?
Answer by Starx
IMO
- There is not going to be a 100% correct answer for this.
- Its totally up to the design of the application.
But, if the same loader is used through out the site, and nothing is loaded outside AJAX, then its probably a good idea to keep the div in the layout and keep it hidden until needed.