Hallo allemaal,
Ik gebruik dit script:
show_image.php
met deze html:
bij het eerste plaatje werkt de lightbox niet (hij blijft maar door laden),bij de 2e wel.
hoe kan dit? want ik ben ten einde raad
EDIT: ik kom er net achter dat dit op elke pagina het geval is (dus elke 2e plaatje werkt, maar de 1e niet)
Ik gebruik dit script:
show_image.php
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
| <?php // The file $filename = $_GET['plaatje']; // Set a maximum height and width $width = $_GET['width']; $height = $_GET['height']; // Content type $the_content = mime_content_type($filename); header("Content-type: $the_content"); // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); $ratio_orig = $width_orig/$height_orig; if ($width/$height > $ratio_orig) { $width = $height*$ratio_orig; } else { $height = $width/$ratio_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, null, 100); ?> |
met deze html:
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
| <div style="border:0;height:200px;overflow:auto;padding:5px;"> <table border='1' style="border-collapse:collapse;width:100%;"> <?php $result = mysql_query("SELECT * FROM gallerij"); while($row = mysql_fetch_array($result)) { echo "<tr><td style='width:80%'> <style type='text/css'> a { border: none; } a:hover { border: none; } </style> <a title='" . $row['naam'] . "' href='show_image.php?plaatje=" . $row['bestandsnaam'] . "&width=300&height=300' rel='lightbox[gallerij]'> <img style='max-width:400;max-height:100px;' src='./" . $row['bestandsnaam'] . "' title='" . $row['naam'] . "' alt='" . $row['naam'] . "' /></a></td><td style='width:20%'>" . $row['naam'] . "<br /> <a href=\"javascript:ubb('[img]http://markvanoort.nl/admin/" . $row['bestandsnaam'] . "','[/img]')\">invoegen</a></td></tr>"; } ?> </table> </div> |
bij het eerste plaatje werkt de lightbox niet (hij blijft maar door laden),bij de 2e wel.
hoe kan dit? want ik ben ten einde raad

EDIT: ik kom er net achter dat dit op elke pagina het geval is (dus elke 2e plaatje werkt, maar de 1e niet)