sending optput from server to clients phase wise

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nirmal.shukla
Forum Newbie
Posts: 1
Joined: Thu Jun 09, 2005 11:37 pm

sending optput from server to clients phase wise

Post 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.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post 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>
Post Reply