Forum Moderators: open
<td align="right" valign="top"><a href="#"><img src="include/sample1.php?nm=../product_images/<?=$image_path;?>&mwidth=268&mheight=376" border="0" /></a></td>
How can I alter this code?
Although the target attribute is deprecated, a simple solution is
<td align="right" valign="top"><a href="path_to/large_image.jpg" target="_blank"><img src="include/sample1.php?nm=../product_images/<?=$image_path;?>&mwidth=268&mheight=376" border="0" /></a></td>
As long as "target" does not exist in the document as an element name or id, it can be anything
target="new window"
target="dfsgdfgfg"
Alternatively, you can use Javascript's open() methods on the anchor. You would write a Javascript function that opens a new window, tailored to the size of the image, but be sure to return false from the Javascript function to the page doesn't navigate to the image. In this scenario, you would still leave the path to the large image in the anchor so if JS is disabled, it will still be accessible:
<a href="path_to/large_image.jpg" onClick="return my_javascript_window('path_to/large_image.jpg',600,400);" target="_blank">