timlondon Posted April 24, 2007 Share Posted April 24, 2007 Hi guys, I'm trying to echo an image with a javascript window.open as below. echo "<td width=\"150\" height=\"120\" align=\"center\" valign=\"middle\" bgcolor=\"#781616\"><img src=\"".$fullimage[$xx]."\" width=\"".$width[$xx]." height=\"".$height[$xx]." border=\"1\" onclick=\"MM_openBrWindow('preview.php?pic=<? echo $fullimage[xx]; ?>','MyPreview','width=500','height=500')\"/></td>"; This opens the window with the address http://199.162.1.65/mother/core/edit/preview.php?pic=<? echo ; ?> How do i get the $fullimage[xx] variable into the "?pic=" ?????????? I've tried various changes to the syntax with no luck. Link to comment https://forums.phpfreaks.com/topic/48456-phpjavascript-syntax/ Share on other sites More sharing options...
taith Posted April 24, 2007 Share Posted April 24, 2007 echo '<td width="150" height="120" align="center" valign="middle" bgcolor="#781616"><img src="'.$fullimage[$xx].'" width='".$width[$xx].'" height="'.$height[$xx].'" border="1" onclick="MM_openBrWindow(\'preview.php?pic='.$fullimage[xx];.'\',\'MyPreview\',\'width=500\',\'height=500\')"/></td>'; should work... :-D Link to comment https://forums.phpfreaks.com/topic/48456-phpjavascript-syntax/#findComment-236940 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.