I have a page where a lot of charts and graphs are calculated. It can sometimes take 30 seconds or so for the calculations to finish and the charts to be displayed. How can I make it so it displays a message while the charts are calculating. Then when they're done, display them.
I have this code that Jim_ gave me:
But the charts still display as they're loaded, and when they finish, the little message doesn't go away.
Any help would be appreciated
I have this code that Jim_ gave me:
PHP:
echo "<div id=\"hidelater\"><b><img src='pages/style/loadingcircle.gif'> Please Wait, Calculating Chart Output. </b></div>
<script>
function tensecs() { document.getElementById(\"hidelater\").innerHTML = '<b><img src=\"pages/style/loadingcircle.gif\"> This can take quite a long time if more than four ads are selected. Please be patient.</b>'; }
window.setTimeout('tensecs()',10000);</script>";
ob_flush(); flush();
// Over 300 lines of chart calculations
echo "<script>document.getElementById(\"hidelater\").style.display = 'none';</script>";
But the charts still display as they're loaded, and when they finish, the little message doesn't go away.
Any help would be appreciated







