Hey all, I'm having a bit of trouble integrating my pop-up windows into this PHP script. Heres the script...
art.php
<html>
<head>
</head>
<body>
<p align='center'><font face='Arial' size='3'><b>[ CS Art ]</b></font></p>
<?
function smltbl( $file )
{
$filename = $file . ".jpg";
$size = getimagesize ( "$filename" );
$fwidth = $size[0];
$fheight = $size[1];
$sm_wid = $fwidth / 2.5;
$sm_hei = $fheight / 2.5;
$fhtm = $file . ".htm";
$link = "Javascript: open(\"$fhtm\",\"asldk\",\"width= $fwidth, height= $fheight, left=0, top=0, resizeable=no\")"; $filesize = filesize("$filename") / 1024;
$intsize = settype( $filesize, integer );
$dllink = "<a href='$link'> Download </a>";
print "
<table border=0 align='center' cellspacing='1' bgcolor='#66CCFF' cellpadding='0'>
<tr>
<td colspan='3' align='center' bgcolor='#FFFFFF'><img src='$filename' width='$sm_wid' height='$sm_hei'></td>
</tr>
<tr>
<td align='center' bgcolor='#FFFFFF'><font face='Arial' size='2'><b> $filename </b></font></td>
<td align='center' bgcolor='#FFFFFF'><font face='Arial' size='2'><b> $filesize </b>kb</font></td>
<td align='center' bgcolor='#FFFFFF'><font face='Arial' size='2'><b> $dllink </b></font></td>
</tr>
</table>
<br><br>
";
}
smltbl ( "csart1" );
smltbl ( "csart2" );
smltbl ( "csart3" );
smltbl ( "csart4" );
smltbl ( "csart5" );
smltbl ( "csart6" );
smltbl ( "csart7" );
smltbl ( "csart8" );
smltbl ( "csart9" );
smltbl ( "csart10" );
smltbl ( "csart11" );
smltbl ( "csart12" );
smltbl ( "csart13" );
smltbl ( "csart14" );
?>
</body>
</html>
The window pops up all right, but the page that the link is on (art.php) changes as well, and displays
[object]
How can I fix it so that art.php stays put?