How do I use the CiviCRM "spinner" in an extension?
You can add the class "crm-loading-element" to the element, and then in your ajax success handler remove the class.

If you want the actual CiviCRM logo, you can add both the classes "blockUI blockOverlay" instead, but depending on the field size it may look off. The other one seems to fit better.

If you want the screen to gray out the way some of the popups do, you can do:

CRM.$.blockUI(CRM.$('div.something').addClass('blockUI').addClass('blockOverlay'));

where div.something is just some larger div surrounding your form, but somewhere within div#crm-container, then your ajax success handler remove it with:

CRM.$.unblockUI(CRM.$('div.something').removeClass('blockUI').removeClass('blockOverlay'));