Write PHP on onmouseover

Hi,

I need to add this code:

POPUP_IMAGE_WIDTH, POPUP_IMAGE_HEIGHT

to:

"onmouseover="doTooltip(event,\\'images/' .$listing['products_image'].'\\')" onmouseout="hideTip()"

Like this:

"onmouseover="doTooltip(event,\\'images/' .$listing['products_image'], POPUP_IMAGE_WIDTH, POPUP_IMAGE_HEIGHT .'\\')" onmouseout="hideTip()"

But it does not work, I have tried several others things too with no luck.

tep_image(DIR_WS_IMAGES . $listings['products_image'], $listings['products_name'] ,POPUP_IMAGE_WIDTH, POPUP_IMAGE_HEIGHT));

Please help me. Thank you very much.

"onmouseover="doTooltip(event,\\'images/' .$listing['products_image'],
<?php echo POPUP_IMAGE_WIDTH ?>, 
<?php echo POPUP_IMAGE_HEIGHT ?> .'\\')" 
onmouseout="hideTip()"

Hi Stephen,

It is not working, it shows the error in browser “Parse error: syntax error, unexpected ‘,’ in /home/artpaint/public_html/includes/modules/product_listing.php on line 298”

I’ve also tried several others variations, but they don’t work either. I’m starting learning PHP, but I’m still very newbie :rolleyes:

This is a tooltip script that currently shows the correct image, but without downsizing it to POPUP_IMAGE_WIDTH and POPUP_IMAGE_HEIGHT sizes.

Here is the complete sentence code, I hope it helps:


          case 'PRODUCT_LIST_IMAGE':
            $lc_text .= '  <tr>' . "\\r\
"
                      . '    <td align="center" height="170" valign="bottom"><div class="linephoto"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, (isset($_GET['manufacturers_id']) ? 'manufacturers_id=' . $_GET['manufacturers_id'] : ($cPath ? 'cPath=' . $cPath : '')) . '&products_id=' . $listing['products_id']) . '" onmouseover="doTooltip(event,\\'images/' .$listing['products_image'].'\\')" onmouseout="hideTip()">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['Aproducts_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div></td>' . "\\r\
"
                      . '  </tr>' . "\\r\
";
            break;

Thanks