views:

21

answers:

0

Hi All

I just want that when Ajax is processing, a message saying "please wait" appears on top the flash/swf movie and then dissappears when Ajax is finish. So during the Ajax process, the 'wmode' is set to 'transparent' and when the Ajax finishes, it 'wmode' is back to normal so the mousewheel works again. The "please wait" message is in a div tag that's absolutely positioned with high z-index. Please can someone advice me on this, whether it's in javascript or jquery I don't mind?

Here's the code:

var form = document.forms["orderDefinition"];
form.elements["formChangeRequest"].value = "true";
$.ajax({
  type: "POST",
  url: "ajax/possibleValues.html",
  data: $("form#orderDefinition").serialize(),
  success: function(response){
    $('#usercontent .sleeve .toprow').html(response);

    applyValidation();

  }
});

// Display a "please wait" message
$("#waitingMsgBox").ajaxStart(function(){

      $(this).show();

  }).ajaxStop(function(){

      $(this).hide();
});

Thanks in advance.