Guest Posted August 1, 2005 Share Posted August 1, 2005 I've tried several ways to write this so it is in the right syntax but just can't seem to get my head around the way to make it work. I'm trying to re-write the way the image pop-up box works and here's what the HTML will look like when generated: <a href="image_name.jpg" onClick="return openPopup('image_name.jpg','product_name');"> of course the image_name and product_name will be dynamically generated like it is now in the default version of OSC. Here's the section of the code I'm trying to re-write so that it does the above: <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> Who's up for the challenge? When finised this will make a great contribution (most of the heavy work is in the javascript file). Details to come... Link to comment Share on other sites More sharing options...
boxtel Posted August 1, 2005 Share Posted August 1, 2005 I've tried several ways to write this so it is in the right syntax but just can't seem to get my head around the way to make it work. I'm trying to re-write the way the image pop-up box works and here's what the HTML will look like when generated: <a href="image_name.jpg" onClick="return openPopup('image_name.jpg','product_name');"> of course the image_name and product_name will be dynamically generated like it is now in the default version of OSC. Here's the section of the code I'm trying to re-write so that it does the above: <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> Who's up for the challenge? When finised this will make a great contribution (most of the heavy work is in the javascript file). Details to come... <{POST_SNAPBACK}> hope I did not miss a quote : echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" Onclick="return openPopup(\'' . $product_info['products_image'] . '\', \'' . $product_info['products_name'] . '\');">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; Treasurer MFC Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2005 Share Posted August 1, 2005 Amanda, Thanks for your quick response and for a great solution. I'm going to have to work on it a bit more to get it to do what I really wanted. It does provide me with the correctly generated html however and I thank you for solution. Link to comment Share on other sites More sharing options...
boxtel Posted August 1, 2005 Share Posted August 1, 2005 Amanda, Thanks for your quick response and for a great solution. I'm going to have to work on it a bit more to get it to do what I really wanted. It does provide me with the correctly generated html however and I thank you for solution. <{POST_SNAPBACK}> looking forward to your contribution. Treasurer MFC Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.