animating table height...

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
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

animating table height...

Post by runelore »

Hi what I want is to have a table's height increase with each cycle of the loop, this is my code and please can someoen tell me how to get this effect... thanks for all help..
<?php

$height='0';
$number='20';

while ($number >= '0')

{
echo "<table width=400 height=$height border=1 cellspacing=0>";
$height=$height+5;
$number=$number-2;

usleep(200);
}

echo "</table>";

?>
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I'm a bit confused by why you want this effect - could you explain a bit more what you are trying to achieve and why.

Thanks,
Mac
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

Post by runelore »

to be honest, i am just trying a few effects for a new site we are designing and thought it would be cool to be able to do such a thing fopr say a menu rollout without using Dhtml.... thus all serverside....
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Don't forget that server-side means that everything is done on the server before anything is displayed in the browser. Client-side effects have to be done using client-side technologies. You'll need to keep refreshing the page to have a table change its height using PHP.

Mac
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

Post by runelore »

oh, sort of forgot about that one/... so isn't there any way of doing it then?
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

Post by runelore »

one query though, when I query a database for results and there ar a lot of results it actyually populates the page in real-time and doesn't run the whole script before outputting.... for an example, go to my site, http://www.kermin.com and in the advanced search type hotels...
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

that's because your output is not buffered or the buffer is flushed. Everything that is in that buffer is sent to the client and the buffer is empty again.
Most browsers display partial documents as soon as they can.
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

Post by runelore »

how do I stop it from displaying the partial document... I want it to fetch all the results first and then display the results.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I try to avoid this question, but "why?"
anyway, take a look at LXXV. Output Control Functions @online-manual
Post Reply