I'm using jquery 1.10.3 to render a reasonably complex dialog. By 'complex', I mean that the contents of the dialog incorporate database-driven data, e.g. drop-down lists containing the result of database queries, as well as some static html (the server-side code is PHP). The dialog is modal, and is only shown when the user clicks on a button within the same page.
Given that the code in question has been produced for a paying client, I'm unable to post it lest I breach the terms and conditions of my contract.
The DIV containing the dialog content lies within the body of an HTML page, as per the JQuery demo:
The problem (as minor as it is) is that the dialog contents are clearly visible (albeit very briefly, i.e. for a number of microseconds) when the page is loading. I am assuming that this is due to the fact that the dialog is rendered first before being hidden by JQuery.
I have tried a number of PHP output buffering configurations, but these appeared to have no impact on the issue. The only possible solution that I can think of, which would require the modification of code considered to be "outside the scope of the current body of work" by my client, is to load the contents of the dialog via a URL when the user clicks on the aforementioned button.
My client is unhappy with this and, accordingly, I must respond professionally. If anyone can point me in the direction of a fix, a workaround or an explanation as to why either of the aforementioned is not possible, it would be greatly appreciated.