Beste tweakers,
Allereerst, ik gebruike Firefox, laatste versie. En ben druk bezig met m'n CMS. En ik kom deze weirde fout tegen. Ben ik nou blind? of is dit een random-render fout? Ik weet het niet meer. Ik hoop dat ik gewoon dom ben en dat jullie zeggen: EY kijk dit is. En dat ik weer kan zeggen "oohh", stom stom.
succes..
Zie screenshot wat het probleem is: screenshot 1 en screenshot 2
Je kan duidelijk zien op de screenshots dat wanneer er een "rood" plaatje staat in de kolom status dat de regel hoogte goed is. Maar zodra er een groen plaatje is dat de regel hoogte verkeerd is en dat het plaatje aan de bovenkant zit.
Dit probleem komt 'random' voor. 1 op de 10 keer bijvoorbeeld. En voor m'n gevoel komt dit probleem vaak (of alleen maar) tevoorschijn als je bijv. 'terug' gaat naar een pagina waar je net vandaan komt. Of dit nou met back gebeurd of dat de site het doet.
Als je de code bekijkt, moet er dus op de 1 of andere manier een verschil zitten tussen het plaatje resolved.png en unresolved.png. Beide zijn trouwens 7pxl groot en op de kleur na zover ik weet identiek hetzelfde. Dus ook qua grootte etc.
Hier de HTML code (ik heb alleen even paar enters weg gehaald om het wat overzichtelijker te maken):
Hier de PHP code die het maakt:
Allereerst, ik gebruike Firefox, laatste versie. En ben druk bezig met m'n CMS. En ik kom deze weirde fout tegen. Ben ik nou blind? of is dit een random-render fout? Ik weet het niet meer. Ik hoop dat ik gewoon dom ben en dat jullie zeggen: EY kijk dit is. En dat ik weer kan zeggen "oohh", stom stom.
succes..
Zie screenshot wat het probleem is: screenshot 1 en screenshot 2
Je kan duidelijk zien op de screenshots dat wanneer er een "rood" plaatje staat in de kolom status dat de regel hoogte goed is. Maar zodra er een groen plaatje is dat de regel hoogte verkeerd is en dat het plaatje aan de bovenkant zit.
Dit probleem komt 'random' voor. 1 op de 10 keer bijvoorbeeld. En voor m'n gevoel komt dit probleem vaak (of alleen maar) tevoorschijn als je bijv. 'terug' gaat naar een pagina waar je net vandaan komt. Of dit nou met back gebeurd of dat de site het doet.
Als je de code bekijkt, moet er dus op de 1 of andere manier een verschil zitten tussen het plaatje resolved.png en unresolved.png. Beide zijn trouwens 7pxl groot en op de kleur na zover ik weet identiek hetzelfde. Dus ook qua grootte etc.
Hier de HTML code (ik heb alleen even paar enters weg gehaald om het wat overzichtelijker te maken):
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| <table id='table-admin' class='text-default' border='1'><tr><td id='table-admin-tr-header' class='text-header' colspan='5'>Admin Modules</td></tr> <tr id="table-admin-tr-header2"><td style="text-align: center; width: 30px;">ID</td><td>Name</td><td style="text-align: center; width: 75px;">Version</td><td style="text-align: center; width: 75px;">Status</td><td style="text-align: center; width: 75px;">Options</td></tr>
<tr><td colspan="5"> </td></tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=1'>1</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=1'>News</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=1'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=1')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=1"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=8'>8</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=8'>Login</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=8'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/unresolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=8')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=8"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=9'>9</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=9'>Project</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=9'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=9')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=9"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=10'>10</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=10'>User</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=10'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=10')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=10"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=11'>11</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=11'>NewsCategory</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=11'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=11')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=11"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=12'>12</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=12'>RSSreader</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=12'>1.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/unresolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=12')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=12"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=13'>13</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=13'>MenuItem</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=13'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=13')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=13"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=14'>14</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=14'>Comment</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=14'>1.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/unresolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=14')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=14"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=15'>15</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=15'>File</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=15'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=15')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=15"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=16'>16</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=16'>FileCategory</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=16'>4.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/resolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=16')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=16"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=17'>17</td>
<td onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=17'>Form</td>
<td align="center" onClick=location.href='?site_id=2&page=admin_Modules&action=edit&id=17'>1.0</td>
<td align="center"><img alt="Status" border="0" src="websites/admin-panel/images/unresolved.png"></td>
<td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=2&page=admin_Modules&action=delete&id=17')"><img border="0" height="10" src="websites/admin-panel/images/delete.png" alt="Delete"></a> <a href="?site_id=2&page=admin_Modules&action=edit&id=17"><img height="10" border="0" src="websites/admin-panel/images/edit.png" alt="Edit"></a></td>
</tr>
<tr><td colspan=5> </td></tr></table> |
Hier de PHP code die het maakt:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| $colspan = "5"; $array = $ObjectProject->get("null", $_SESSION['user_level']); $startViewForm = $ObjectForm->startViewForm($page_title, $colspan); $stopViewForm = $ObjectForm->stopViewForm($colspan); $max = count($array) -1; echo $startViewForm; ?> <tr id="table-admin-tr-header2"><td style="text-align: center; width: 30px;">ID</td><td>Name</td><td style="text-align: center;">User</td><td style="text-align: center; width: 75px;">Status</td><td style="text-align: center; width: 75px;">Options</td></tr> <tr><td colspan="<?php echo $colspan; ?>"> </td></tr> <?php for ($i = 0; $i < $max; $i++ ) { $onclick = "onClick=location.href='?site_id=" . $site_id . "&page=" . $page . "&action=edit&id=" . $array[$i]['id'] . "'"; ?> <tr onMouseOver="this.style.backgroundColor='#acf88c'" onMouseOut="this.style.backgroundColor='#ffffff'"> <td align="center" <?php echo $onclick; ?>><?php echo $array[$i]['id']; ?></td> <td <?php echo $onclick; ?>><?php echo $array[$i]['name']; ?></td> <td align="center" <?php echo $onclick; ?>><?php echo $array[$i]['user_login']; ?></td> <td align="center"><img alt="Status" border="0" src="<?php echo $site_path; ?>images/<?php if ($array[$i]['status'] == "1") { echo "resolved.png"; } else { echo "unresolved.png"; } ?>"></td> <td align="center"><a href="javascript:bevestig('Are%20you%20sure%20to%20delete%20this%20item?','?site_id=<?php echo $site_id; ?>&page=<?php echo $page; ?>&action=delete&id=<?php echo $array[$i]['id']; ?>')"><img border="0" height="10" src="<?php echo $site_path; ?>images/delete.png" alt="Delete"></a> <a href="?site_id=<?php echo $site_id; ?>&page=<?php echo $page; ?>&action=edit&id=<?php echo $array[$i]['id']; ?>"><img height="10" border="0" src="<?php echo $site_path; ?>images/edit.png" alt="Edit"></a></td> </tr> <?php } echo $stopViewForm; |
[ Voor 35% gewijzigd door quakerix op 18-04-2007 00:28 ]