Have you seen the functionality of Show Processing when using a dynamic action with action: Submit page?
when called it will add some div’s to your page which you have to remove manualy when your are done with your action.
Code for removall:
Or use it like this:
setTimeout is used to simulate a 2 second AJAX call.