[jQuery] .load of content does not always include DB connection

[jQuery] .load of content does not always include DB connection


I have a website where I pull a lot of different pages into one CMS
page. The problem is the loaded page will occasionaly say "No database
selected". But if I click the link and load the page again the content
will show correctly.
Is there a way to check if connection has been made or a way to delay
the load by milliseconds?
Thanks.