Page 1 of 1

sending optput from server to clients phase wise

Posted: Thu Jun 09, 2005 11:49 pm
by nirmal.shukla
hi!
do you have any code in php to transfer data from server to client phase wise.
if you are not getting what i mean
just open http://www.gmail.com and see how it diaplays
LOADING... first then loads the page.
please suggest any code.

Posted: Thu Jun 09, 2005 11:54 pm
by anjanesh
I dont know how google works but you can try using Javascript to display a table after the page has loaded.

Code: Select all

<head>
 <script type=&quote;text/javascript&quote;>
 function DisplayPage()
  {
         document.getElementById(&quote;LoadingTable&quote;).style.display = &quote;none&quote;;
         document.getElementById(&quote;MainTable&quote;).style.display = &quote;&quote;;
  }
 </script>
</head>
<body onload=&quote;DisplayPage()&quote;>
<table id=&quote;LoadingTable&quote;>
// Loading...
</table>

<?php
flush(); // Send the HTML data on top immediately
?>

<table id=&quote;MainTable&quote; style=&quote;display:none&quote;>
// Other data
<table>
</body>