Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Blocking UI till document is ready

 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would figure out why your page loads in such a horrible way that you would have to worry about blocking user input.

Eric
 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,

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.

Thanks
Suvojit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic