views:

66

answers:

1

What is the easiest way to disable an entire HTML page until an initial .load call is complete? What I mean by disable is the user can not interact with it in any way. It is ok for them to navigate away.

I am using jQuery 1.2.6. Is it to set the call to be sync instead of async? how do you set options for this on the .load function?

UPDATE
this seems to be working - am I off base?

function doSomething() {
     $.ajaxSetup({ async: false });
     $('#someArea').load('... args ...');
     $.ajaxSetup({ async: true });
}
+9  A: 

Block with HTML+CSS, unblock with jQuery

The best way would be to have your HTML with the overlaid DIV that blocks all clicks to the content of the page. So it acts as a mask. This mask would have to be positioned, dimensioned and styled using CSS.

When page load happens, you can use jQuery and remove this mask hence enable your page.

Robert Koritnik
@tyndall: thank you for accepting my answer.
Robert Koritnik