Hi
Multiple rows of dynamically created data is retrived from the database and displayed properly.
When I get 50 rows displayed scrolling is necessary.
The problem is when I scroll to see the items at the bottom of the list the rows get blurred (jumbled).
To be specific at the top and bottom rows of the list are displayed properly but in the middle the rows get blurred.
Can you you see something wrong with my code? How can I make this work?
Note: This is part of the code related to the problem

<?php
include("../config/db_connect_in.php");
?>
<html>
<body>
<?php
function ohip_fee_search_result_display($org_code, $field, $searching, $find, $special,
$services, $schedule_year, $db_id)
{
$mysqli = db_connect();
db_select($mysqli, $db_id);
/***************** this section displays the services***************/
//search area display area layer and table
echo "<table width=\"99%\" border=\"0\">
<tr align=\"center\" bgcolor=\"#FFFFFF\" height=\"\">
<td width=\"100%\" >
<div id=\"Layer2\" style=\"position:absolute; width:100%; height:320px; z-index:2; left: 4px; top: 510px;\">
<div id=\"pat-dash-scroll-box2\" style=\"overflow: auto; float: left; width: 100%; height: 310px; margin: 0px; \">\n";
 
//table begins
echo "<table width=\"99%\" height=\"332\" left =\"40\" align = \"\" border=\"0\" font face =\"arial\">\n";
 
/********** determine which and how to select data to display *********/
$data = "SELECT c.code_id, c.fee_code, c.description, m.general_fee,
FROM bill_ohip_fee_code c, $fee_master_table m
WHERE c.fee_code = m.code
AND c.section_code = '$services'
ORDER BY c.fee_code
";
$result = mysqli_query($mysqli,$data) or die('Error, bottom query failed');
$num_service = mysqli_num_rows($result);
for($i=0; $i < $num_service; $i++)
{
$row = mysqli_fetch_array($result);
list($code_id, $fee1_code, $description, $s_fee) = $row;
 
if($i % 2) //alternate row colour
{
$bgcolor="#eeeee0";
}
else
{
$bgcolor="#ebeae0";
}
//diaplay search results in rows
echo"<tr height=\"10\">
<td width=\"4%\" bgcolor=\"#fff8dc\" align=\"center\">
<input type=\"checkbox\" name=\"fee1_choice[$i]\" value=\"$code_id\"></td>
<td width=\"7%\" bgcolor=\"#fff8dc\" ><span class=\"style20\"><strong>$fee1_code</strong></span></td>
<td width=\"3%\" bgcolor=\"$bgcolor\" height=\"10\">
<input type=\"text\" name=\"fee1_unit[$i]\" size=\"1\" maxlength=\"2\" value =\"$fee1_unit\"/>
</td>
<td width=\"79%\" bgcolor=\"$bgcolor\" class=\"style20\"> $description </td>
<td width=\"6%\" align=\"left\">$s_fee</td>\n";
echo"</tr>\n";
 
}//end of for loop
echo "</table>\n";
echo "</div>\n";
echo "</div>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
?>
</body>
</html>

My problem with the scrolling is solved. It was looking blurred because of a duplicate function displaying the same info.

Eg. 
<? 
Function display()
{
Return $multiple_array_values;
}
List() = display();//NOTE: this was creating the duplicate
?>

Changed to

<?
Function display()
{
Return $multiple_array_values;
}
List() = $multiple_array_values
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.