jQuery & PHP: Running action in background
<p>so I want to do something like when you press on LogOut, you get a waiting message like "please wait.." while its running ucp.php?mode=logout in the background, and after it has loaded that it should refresh the site.</p>

<p>How should this be done??</p>

<p>I am new to jquery, but so far i gave my link a ID, called #logout, made a <code>&lt;div id="message"&gt;&lt;/div&gt;</code> and then in jquery i did:</p>

<pre><code>jQuery(document).ready(function(){
    $('#tryout').click(function () {
        logOut();
    });

function logOut()  { 
  var postFile = 'ucp.php?mode=logout';
  $.post(postFile, function(data){
        $("#message").fadeIn('slow');
  });
}
</code></pre>

<p>Now is this right? And the line with #message, where it fades in, i don't really think its right because where's should i write the "Please wait" and the refresh part? </p>

<p>Please help me</p>
