wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Blocking UI till document is ready Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Blocking UI till document is ready" Watch "Blocking UI till document is ready" New topic

Blocking UI till document is ready

Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 62
Hi all,

I have following situation:

There are pages containing input field where in user enters value. Now I have a requirement to block UI untill the document is ready and every input field is rendered. I have found that I can use blockUI plugin for this : http://jquery.malsup.com/block/
I have also found few good examples in : http://www.malsup.com/jquery/block/#demos

Now, my problem is how do I call $.blockUI() on pre-ready stage and call $.unblockUI(); on .ready(). I would want my UI to be locked untill the doc is ready. I can put call to $.unblockUI(); in .ready() but where do I put $.blockUI().

Please help me in solving this issue.

Thanks in advance.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
I would figure out why your page loads in such a horrible way that you would have to worry about blocking user input.

Suvojit Chakraborty
Ranch Hand

Joined: Nov 10, 2009
Posts: 62

Thanks for reply. Reason is because of poor internet connection. Most of the time everything is ok. But it has been observed that if internet has issues then in that case we can enter information on UI input elements before page gets loaded completely.

I agree. Here's the link: http://aspose.com/file-tools
subject: Blocking UI till document is ready
Similar Threads
Is it possible to put a button inside autocomplete in jquery ui plugin?
pass value from struts2 form to javascript
Bodgitt and Scarper, LLC. assignment - Database field name "size"
Dijit filteringselect, async update of store
Question for anyone who implemented 48 hr rule