Topic: again..... message 'working' while busy with the database

If a user presses a key, there will go a new order in the database.
This might take some time. This time is in the code increased by 7 seconds to demonstrate the problem.
All I got now is pause of 7 seconds, and then the message 'done'.
In fact, I want to tell the browser to refresh the <div> message  (see code)

Any ideas? Thanks!

function new_order () {
   tell("inserting order...");
   // I want the browser here to refresh immediatly the <div> 'message' BEFORE starting the xajax_ things.
   xajax_new_order(xajax.getFormValues('ThisForm'));
   p(7000);
   xajax_orders(xajax.getFormValues('ThisForm'));
   tell("done");
   return false;
}
//
function tell (p_message) {
  document.getElementById("message").innerHTML=p_message;
}