Jump to content

PHP/JAVASCRIPT SYNTAX


timlondon

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.