Scrolling display is blurred

Thread Solved

Join Date: Oct 2006
Posts: 82
Reputation: assgar is an unknown quantity at this point 
Solved Threads: 0
assgar assgar is offline Offline
Junior Poster in Training

Scrolling display is blurred

 
0
  #1
May 24th, 2007
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
  1. <?php
  2. include("../config/db_connect_in.php");
  3. ?>
  4. <html>
  5. <body>
  6. <?php
  7. function ohip_fee_search_result_display($org_code, $field, $searching, $find, $special,
  8. $services, $schedule_year, $db_id)
  9. {
  10. $mysqli = db_connect();
  11. db_select($mysqli, $db_id);
  12. /***************** this section displays the services***************/
  13. //search area display area layer and table
  14. echo "<table width=\"99%\" border=\"0\">
  15. <tr align=\"center\" bgcolor=\"#FFFFFF\" height=\"\">
  16. <td width=\"100%\" >
  17. <div id=\"Layer2\" style=\"position:absolute; width:100%; height:320px; z-index:2; left: 4px; top: 510px;\">
  18. <div id=\"pat-dash-scroll-box2\" style=\"overflow: auto; float: left; width: 100%; height: 310px; margin: 0px; \">\n";
  19.  
  20. //table begins
  21. echo "<table width=\"99%\" height=\"332\" left =\"40\" align = \"\" border=\"0\" font face =\"arial\">\n";
  22.  
  23. /********** determine which and how to select data to display *********/
  24. $data = "SELECT c.code_id, c.fee_code, c.description, m.general_fee,
  25. FROM bill_ohip_fee_code c, $fee_master_table m
  26. WHERE c.fee_code = m.code
  27. AND c.section_code = '$services'
  28. ORDER BY c.fee_code
  29. ";
  30. $result = mysqli_query($mysqli,$data) or die('Error, bottom query failed');
  31. $num_service = mysqli_num_rows($result);
  32. for($i=0; $i < $num_service; $i++)
  33. {
  34. $row = mysqli_fetch_array($result);
  35. list($code_id, $fee1_code, $description, $s_fee) = $row;
  36.  
  37. if($i % 2) //alternate row colour
  38. {
  39. $bgcolor="#eeeee0";
  40. }
  41. else
  42. {
  43. $bgcolor="#ebeae0";
  44. }
  45. //diaplay search results in rows
  46. echo"<tr height=\"10\">
  47. <td width=\"4%\" bgcolor=\"#fff8dc\" align=\"center\">
  48. <input type=\"checkbox\" name=\"fee1_choice[$i]\" value=\"$code_id\"></td>
  49. <td width=\"7%\" bgcolor=\"#fff8dc\" ><span class=\"style20\"><strong>$fee1_code</strong></span></td>
  50. <td width=\"3%\" bgcolor=\"$bgcolor\" height=\"10\">
  51. <input type=\"text\" name=\"fee1_unit[$i]\" size=\"1\" maxlength=\"2\" value =\"$fee1_unit\"/>
  52. </td>
  53. <td width=\"79%\" bgcolor=\"$bgcolor\" class=\"style20\"> $description </td>
  54. <td width=\"6%\" align=\"left\">$s_fee</td>\n";
  55. echo"</tr>\n";
  56.  
  57. }//end of for loop
  58. echo "</table>\n";
  59. echo "</div>\n";
  60. echo "</div>\n";
  61. echo "</td>\n";
  62. echo "</tr>\n";
  63. echo "</table>\n";
  64. }
  65. ?>
  66. </body>
  67. </html>
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 82
Reputation: assgar is an unknown quantity at this point 
Solved Threads: 0
assgar assgar is offline Offline
Junior Poster in Training

Re: Scrolling display is blurred

 
0
  #2
May 31st, 2007
My problem with the scrolling is solved. It was looking blurred because of a duplicate function displaying the same info.
  1. Eg.
  2. <?
  3. Function display()
  4. {
  5. Return $multiple_array_values;
  6. }
  7. List() = display();//NOTE: this was creating the duplicate
  8. ?>
Changed to
  1. <?
  2. Function display()
  3. {
  4. Return $multiple_array_values;
  5. }
  6. List() = $multiple_array_values
  7. ?>
Last edited by assgar; May 31st, 2007 at 1:24 pm.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC