On block save, execute background function

Permalink
Hi all

I've created a custom map block which geocodes the addresses when the block is saved. Trouble is, to avoid Google's query limits I've had to implement a delay in the geocoding, but this means the user has to sit looking at a spinner for 10-15 seconds when they save the block.

Is it possible to hand off to another function, which will complete in the background, once the save() function is fired?

Any help much appreciated :)

melat0nin