'loading' message after dialog button clicked.

'loading' message after dialog button clicked.

Hello Guys,

I've got a jQuery UI dialog window which opens up containing a form, when the button on the dialog is clicked it submits the form. The code for which looks something like this:  http://pastebin.com/bKSJaLCA and on screen looks something like this:  http://tinypic.com/view.php?pic=2l9ldsn&s=5

When we're under heavy load this process can sometimes take a number of seconds and I'm looking for a nice way to let the user know we're dealing with their request. It'll look something like this:  http://tinypic.com/view.php?pic=293c3dk&s=5

Can someone help help my rewrite the function which is actioned on the click so that it hides the dialog content and buttons and displays the loading message / animated gif or whatever it may be.

Thanks,

Robert