Jquery Ajax with ruby on rails (show loading message on a div) -


I need to show till a message is loaded until the data is back and updates to my div. is. . I can update the data at full ..

& gt; Click (function () {$ $ .ajax ({url: '/ calendar / showcal / & lt;% = @ space.id% & gt;', type: 'gET', datatype: 'script', data : {Month: '9'},

  complete: function (data) {}});});});   

& lt;% end% & gt;

You can use first send callback to start loading ... statement or any other animation And can reject it at the full callback function.

  & lt;% = javascript_tag%> Click (function () {$ .ajax ({url: '/ calendar / showcal / & lt;% = @ space.id% & gt;', type: '' GET '', data type: 'script', data : {Month: '9'}, ** first: function () {}, ** complete: function (data) {}});});}); & Lt;% end% & gt;    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -