I may be going about this all wrong, but I can't think of an alternative. i have a page with several datatables. Some of them rely on a value from a cookie. I do this in the controller. I have javascript that checks for the cookie and if not set, it displays a form for the user to set the value. The problem is while the form is popped up, the controllers are loading the datatables in the background.
I tried moving the cookie before $(document).ready but the pop-up form needs the document to be drawn. so I have a chicken/egg (or is that a cookie/milk) scenario.
Is there a way to delay the loading of the datatabes until the user clicks submit on the pop-up form? I really hope this post makes sense...it is an ugly scenario.