I'm using this javascript:
[PHP]<script type='text/javascript' language='JavaScript'>
function PopUp(url) {
remote=window.open(url,'PopUpWindow','height=500,w idth=500,top=50,left=200,alwaysLowered=0,alwaysRai sed=0,channelmode=0,dependent=1,directories=0,full screen=0,hotkeys=0,location=0,menubar=0,resizable= 0,scrollbars=yes,status=0,titlebar=0,toolbar=0,z-lock=33');
if (!remote.opener)
remote.opener = self;
if (window.focus)
remote.focus();
}
</script>[/PHP]
And in the web page:
[PHP]echo '
<tr><td width="25%" align="right" valign="top">
<a href="javascript:popImage('http://www.mysite.com/gallery/<?php echo "$image_name"; ?>', '<?php echo "$item_title"; ?>')"><img src="gallery/thumbs/$image_name" width="$thumb_w" height="$thumb_h" alt="$item_title"></a></td>
<td width="1%"> </td>
<td width="74%" valign="top"><u><strong>$item_title</strong></u><br><br>$item_desc</td></tr>
<td colspan="3"><hr></td></tr>
';[/PHP]
Is it possible to use a javascript popup window to display pictures using php variables? The ' and " seem to get things screwed up. You can use backslashes in the javascript code because it fails. The above just prints out $item_title and $item_desc on the web page and the thumbnail doesn't even show at all.