I'm using the DevText
( http://www.developershed.com/devtext.php )
in my home page.
Bcos of n/w unstability, my home page takes time to load as it connects to devshed to get the details..
How to by-pass this and flush all the other details - all the other contents are just html in my page - and then let that takes its own time to display..
till that time i shud show something in that area.. like 'Loading..'
any idea?
showing something till it gets loaded...
Moderator: General Moderators
-
psmshankar
- Forum Commoner
- Posts: 96
- Joined: Tue Aug 06, 2002 4:25 am
- Location: India
-
psmshankar
- Forum Commoner
- Posts: 96
- Joined: Tue Aug 06, 2002 4:25 am
- Location: India
when it comes to 'Please wait, loading....' I usually use this snippet:
Code: Select all
echo "<div id='loading_div' style='display:none'> Loading, please wait.... </div>";
echo <<<EOF
<script language="Javascript" type="text/javascript">
load_div = document.getElementById('loading_div');
content_div = document.getElementById('content_div');
content_div.style.display = 'none';
load_div.style.display = 'block';
</script>
EOF;
flush();
echo "<div id='content_div'>";
echo " CONTENT GOES HERE ";
echo " EVEN MORE CONTENT ";
echo "</div>";
echo <<<EOF
<script language="Javascript" type="text/javascript">
load_div.style.display = 'none';
content_div.style.display = 'block';
</script>
EOF;
flush();