- --- In email@example.com, "peterbayrealty" <peterbayrealty@...>
>if you want to display an image when you mouse over, then make your
> I tried to use the same logic as Bob had suggested before to place
> the correct backslashes, but I'm stumped as to where to place them.
> It displays the item name correct in $name, but when onMouseOver
> it's supposed to display the product image but it doesn't work.
> $name = addslashes(preg_replace(' /\r|\n/', '<br />',$products
> $info_box_contents[$row] = array('align' => 'left',
> 'params'=> 'class="infoBoxContents"
> width="33%" valign="top"',
> 'text' => '<a href="' .tep_href_link
> (FILENAME_PRODUCT_INFO, 'products_id=' . $products
> ['products_id']) . '
> onMouseOver="overlib(\'' . tep_image
> (DIR_WS_IMAGES . $products['products_image'],'') . '\',HAUTO, VAUTO,
> FGCOLOR, \'#FFFFFF\')"
> onMouseOut="nd()">' .
> $name . '</a>');
> Thanks for your help in advance.
argument to overlib:
\'' . tep_image(DIR_WS_IMAGES . $products['products_image'],'') . '\'
to be an image reference like this:
'<img width="xxx" height="yyy" src="ssss" />' where "ssss" is the path
to your image (which I'll let you sort out because you're more familar
with your coding than I am.) If the image is large then you may want
to preload it so that there isn't any delay in it being shown. Just
what does the function tep_image() return? As a bare minimum you can
eliminate the width and height attributes but you're better off using
them if you can.