Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

disable tooltips


sackling

Recommended Posts

I have installed mootools tooltips on my site which I plan on using when hovering over images. the problem is that, and I'm not sure if this is due to oscommerce or not, if you hover over the image the regular tooltip still pops up with the product name. which means I now have 2 tooltips popping up.

 

you can see this problem happening right here: http://tinyurl.com/ckkk3s

 

So my question to you guys is, do you know a way to disable these tooltips?

 

any help is much appreciated as always. Thanks,

 

Rob

Link to comment
Share on other sites

Looking at your page source in my browser, here's a typical entry (line breaks added):

<td  valign="top">
	<table border="0" cellpadding="0" cellspacing="0" width="158px"><tr><td align="left">
	<table border="0" bordercolor="#E8E8E8" cellspacing="0" cellpadding="0" >
  <tr><td  height="210" align="center" width="159">
 <a class="Tips2" title="Product Info ::- Byzantine Collection - Pear Drop Earrings - Green Amethyst <br /><br /> 
 $1350.0000"  href="http://www.anzie.com/byzantinecollectionpeardropearringsgreenamethyst-p-1304.html?osCsid=8bae70a215670d2dd7a0d1d0e2022258 " >
 <img src="images/1792ggh new copy.jpg" border="0" alt="- Byzantine Collection - Pear Drop Earrings - Green Amethyst" 
  title=" - Byzantine Collection - Pear Drop Earrings - Green Amethyst " width="159" height="210"> </a></td>
</tr></table></td></tr>
	</table></td>

 

You have the link itself <a href=...> with its own title= attribute under class=Tips2. This produces the white-on-gray text. I presume that this comes from the mootools tooltips contribution, and is the one you want to keep.

 

You also have an image (<img ...>) as the displayed content of the link. It has both the alt= attribute (for when graphics are not displayed) and the title= attribute. This displays the black-on-white text you see as a "tooltip". Your mission, Jim, should you choose to accept it, is to find where the title= attribute is inserted into the image tag and change it to title="". You do NOT want to delete this attribute, because Internet Explorer browsers will erroneously display the alt= text as the tooltip!

 

I haven't tried running this myself, but I would look in includes/functions/html_output.php first. It's probably in there. Just change the title= $alt_text to title="" and see what happens. The code is something like this:

 if (tep_not_null($alt)) {
  $image .= ' title=" ' . tep_output_string($alt) . ' "';
}

 

Try changing it to

 $image .= ' title=""';

 

Note that this will get rid of your image titles everywhere, not just where you're using mootools, so test thoroughly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...