how to use oncomplete in Rails-3.2.1 Ajax

I'm using Rails-3.2.1 and working on ajax.

Below is my code and I want to add woking in progress msg while my
function is in progress.