Loading ...
Sorry, an error occurred while loading the content.

Re: One more Javascript and OSCommerce PHP help please

Expand Messages
  • Robert E Boughner
    ... if you want to display an image when you mouse over, then make your argument to overlib: . tep_image(DIR_WS_IMAGES . $products[ products_image ], ) .
    Message 1 of 2 , Mar 1, 2007
    • 0 Attachment
      --- In overlib@yahoogroups.com, "peterbayrealty" <peterbayrealty@...>
      wrote:
      >
      > 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
      > ['products_name']));
      >
      > $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']) . '
      > "javascript:;"
      > onMouseOver="overlib(\'' . tep_image
      > (DIR_WS_IMAGES . $products['products_image'],'') . '\',HAUTO, VAUTO,
      > FGCOLOR, \'#FFFFFF\')"
      > onMouseOut="nd()">' .
      > $name . '</a>');
      >
      >
      > Thanks for your help in advance.
      >

      if you want to display an image when you mouse over, then make your
      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.

      Bob
    Your message has been successfully submitted and would be delivered to recipients shortly.