
Wie muß ich folgenden Code ändern/erweitern damit das aufgehende Fenster nur so groß ist wie das Bild?
Code: Alles auswählen
while($file=readdir($handle)):
$fileendung=explode(".",$file);
for($i=0;$i<sizeof($dateiendung);$i++):
if($fileendung[1]==$dateiendung[$i]):
if($count<($maxGrafik+$geschrieben) and $count>=$geschrieben):
# Datei wird ausgegeben
echo '
<td>
<a href="#" onClick="window.open(\''.$dir.'/'.$file.'\',\'open\',\'toolbar=no,scrollbars=no,status=no,locationbar=no,personalbar=no,menubar=no\')"><img src="'.$dir.'/'.$file.'" width="'.$maxBreite.'" border="0" alt="'.$file.'"></a>
</td>
';
$j++;
endif;
$count++;
if($j==$anzahlSpalten):
echo '</tr><tr>';
$j=0;
endif;
$anzahl++;
continue(1);
endif;
endfor;
endwhile;