I would recommend jQuery Ajax including the .ajaxStart() .ajaxStop() to do stuff like display a panel until/while the ajax event is active.
see here for more information: http://api.jquery.com/category/ajax/
EDIT: some complete sample code:
$(document).ready(function()
{
/***************************************/
function testLoadTime(jdata)
{
$("#timeResult").text(jdata);
};
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
data: "{}",
dataFilter: function(data)//makes it work with 2.0 or 3.5 .net
{
var msg;
if (typeof (JSON) !== 'undefined' &&
typeof (JSON.parse) === 'function')
msg = JSON.parse(data);
else
msg = eval('(' + data + ')');
if (msg.hasOwnProperty('d'))
return msg.d;
else
return msg;
},
url: "MyProcedure.asmx/GetServerTimeString",
success: function(msg)
{
testLoadTime(msg);
}
});
});
server side:
[WebMethod]
public static string GetServerTimeString()
{
return "Current Server Time: " + DateTime.Now.ToString();
}