Phill Pafford
09-13-2006, 10:29 AM
Working on a site that pulls data from directories and displays the results in a table. Im using fieldsets to give a heading information about what directory and process is running. Im usung PHP, JavaScript and HTML.
My Question is, when there are many files to view my page gets really long (Scroll Down to see all the files). I dont mind scrolling but I would like to keep the table cells all the same size and make the table cell scrollable instead of the whole page itself.
Is there a way to place a scroll bar in a table cell if the information displayed is greater then the space of the cell?
Here is some of my code
echo("<td valign=\"top\">");
$proj = "NameOfProject";
$proc = "NameOfProcess  ";
$dir=$d3;
$dir= check_dir();
echo("</td>");
echo("</tr>");
echo("</table>");
//Checks the directory for folders and files
function check_dir()
{
global $dir, $proj, $proc;
$openDir=opendir($dir);
$when = `date`;
echo("<fieldset><legend>$proj - $proc</legend>");
echo("Location:<br><font color=\"blue\">$dir</font><br>Time:<br><font color=\"blue\">$when</font><hr>");
while(false !=($file= readdir($openDir)))
{
if(!preg_match('/^\./',$file))
{
echo("$file<br>");
}
}
echo("</fieldset><br>");
}
My Question is, when there are many files to view my page gets really long (Scroll Down to see all the files). I dont mind scrolling but I would like to keep the table cells all the same size and make the table cell scrollable instead of the whole page itself.
Is there a way to place a scroll bar in a table cell if the information displayed is greater then the space of the cell?
Here is some of my code
echo("<td valign=\"top\">");
$proj = "NameOfProject";
$proc = "NameOfProcess  ";
$dir=$d3;
$dir= check_dir();
echo("</td>");
echo("</tr>");
echo("</table>");
//Checks the directory for folders and files
function check_dir()
{
global $dir, $proj, $proc;
$openDir=opendir($dir);
$when = `date`;
echo("<fieldset><legend>$proj - $proc</legend>");
echo("Location:<br><font color=\"blue\">$dir</font><br>Time:<br><font color=\"blue\">$when</font><hr>");
while(false !=($file= readdir($openDir)))
{
if(!preg_match('/^\./',$file))
{
echo("$file<br>");
}
}
echo("</fieldset><br>");
}