944,191 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 1448
  • PHP RSS
May 24th, 2007
0

Scrolling display is blurred

Expand Post »
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 Syntax (Toggle Plain Text)
  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>
Similar Threads
Reputation Points: 24
Solved Threads: 0
Junior Poster in Training
assgar is offline Offline
89 posts
since Oct 2006
May 31st, 2007
0

Re: Scrolling display is blurred

My problem with the scrolling is solved. It was looking blurred because of a duplicate function displaying the same info.
PHP Syntax (Toggle Plain Text)
  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
PHP Syntax (Toggle Plain Text)
  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.
Reputation Points: 24
Solved Threads: 0
Junior Poster in Training
assgar is offline Offline
89 posts
since Oct 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Square Image Thumbnail
Next Thread in PHP Forum Timeline: site will not display php, only the code contents





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC