Jump to content

Recommended Posts

 

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>

Link to comment
https://forums.phpfreaks.com/topic/52872-solved-scrolling-display-is-blurred/
Share on other sites

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
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.