Async Events ?

When I press my button I want to save the current record and move to the next step in the flow. At the same time I want to do a long process of validating if the email acutally exists.

This validation should happen in a async process, otherwise the user has to wait for the result (and this process might take a while)

I tried using events, but then when the event handler takes 10 sec (sleep 10 for now) then the user still has to wait for the event handler to return.

Guess it is not handled async.

Is there a way to handle those events without having the user to wait for the result ?

For anyone interested. I seem to have solved this with an ajax request when the button was pressed


   $("#recipient_submitme_next").click(function() 

   {

        $.ajax({url: "$url", 

            success: function(result)

            {

            }

            });   

   });