Nieuw lid |
|
Het onderstaande php werkt.
Maar hoe kan ik nu als ik op de foto klik de pagina in het groot weergeven (met rezise, waarvan ik de max hoogte en breedte kan ingeven)
<SCRIPT language=javascript>
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);
function doPic(imgName,imgAlt)
{
if (ns3up || ie4up)
{
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
document.mainpic.alt = imgAlt;
}
}
</script>
<?php
$rootdir ="";
$dir = "album_1/";
$teller = -1;
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$teller++;
$img[$teller] = $file;
}
}
}
closedir($handle);
for ($i = 1; $i <= $teller; $i++) {
echo "<a href=\"javascript:doPic('$dir$img[$i]','(c) JS 2004');\">;"
echo "<img src=\"$dir$img[$i]\" width=75 height=57 hspace=\"2\" vspace=\"2\" border=0></a>";
}
<table width="580" height="336"border="0">
<tr>
<td align="left" valign="top"> <span class="imgTitle"><?php echo "$Albumtitel"; ?></span><br>
<TABLE width="102%" height="377">
<TBODY>
<TR>
<TD align="center" valign="middle"><strong><?php echo "$Albumtitel"; ?></strong><br> <br>
<IMG src="images/A1.jpg" name=mainpic> </TD>
</TR>
</TABLE>
</td>
</tr>
</table>
<SCRIPT language=javascript> browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); ns3up = (browserName == "Netscape" && browserVer >= 3); ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4); function doPic(imgName,imgAlt) { if (ns3up || ie4up) { imgOn = ("" + imgName); document.mainpic.src = imgOn; document.mainpic.alt = imgAlt; } } </script> <?php $rootdir =""; $dir = "album_1/"; $teller = -1; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $teller++; $img[$teller] = $file; } } } for ($i = 1; $i <= $teller; $i++) { echo "<a href=\"javascript:doPic('$dir$img[$i]','(c) JS 2004');\">;" echo "<img src=\"$dir$img[$i]\" width=75 height=57 hspace=\"2\" vspace=\"2\" border=0></a>"; } <table width="580" height="336"border="0"> <tr> <td align ="left" valign ="top"> <span class="imgTitle"><?php echo "$Albumtitel"; ?></span><br> <TABLE width="102%" height="377"> <TBODY> <TR> <TD align="center" valign="middle"><strong> <?php echo "$Albumtitel"; ?></strong><br> <br> <IMG src="images/A1.jpg" name=mainpic> </TD> </TR> </TABLE> </td> </tr> </table>
|