Use a plugin like blockUI
http://malsup.com/jquery/block/
then it's as easy as having a div wrapped around your UI like:
<div id="Page_Block">
.... your content .....
</div>
and then when you call your getJSON method:
$("SomeButton").click(function() {
$("Page_Block").block();
$.getJSON(
"somepage.html"
{ Params },
function(result) {
... your success code ....
$("Page_Block").unblock();
}
);
});
On Oct 3, 1:29 pm, Adwin Wijaya <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need to add ajax loading before jQuery.getJSON loaded ... because on
> some user, the connection was pretty slow and they needs to wait for
> several seconds...
>
> please tell me how to add ajax loading message (i will supply with the
> image and overlay div) before getJSON loaded and after getJSON
> finished.
>
> thanks