I want a tooltip for my site but have a real problem getting the javascript to work.
I've followed the instructions to the letter and nothing seems to get this script working.
Here is the tooltip script I'm looking to use.
http://www.walterzorn.com/tooltip/tooltip_e.htm
Here are the instructions for implementing the script which are pretty easy!
1. Link wz_tooltip.js into the html file
Copy the following line to inside the BODY section, preferably immediately after the opening <body> tag: <script type="text/javascript" src="wz_tooltip.js"></script> If necessary, adapt the path 'src="wz_tooltip.js"' to the JavaScript file. Note: Use the downloaded file only, do not hardlink wz_tooltip.js from my site.
2. Specify tooltip text inside onmouseover eventhandlers
Each of the html tags to display a tooltip requires an onmouseover and an onmouseout attribute like so: Including the script at the beginning of the body section ensures that the tooltips are almost immediately functional, before loading the page has been finished.
<a href="index.htm" onmouseover="Tip('Some text')" onmouseout="UnTip()">Homepage</a> That's all. No title attributes, no container DIV. As you can see, the text to be displayed must be enclosed with single quotes, and be passed to a function Tip().
I've uploaded the javascript files and am calling them from the /customer/home.tpl as follows:
PHP Code:
{literal}<script type="text/javascript" src="{$SkinDir}/modules/wz_tooltip/wz_tooltip.js"></script>{/literal}
Then implemented the call to mouseover for the tooltip on the link as follows:
PHP Code:
<a href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}{if $featured eq 'Y'}&featured{/if}" onmouseover="Tip('Some text')" onmouseout="UnTip()"><font class="ProductTitle">{$products[product].product}</font></a>
I've tried the javascript before the </head> tag and after the <body> tag and nothing seems to make this work.
Anyone got any ideas!!!!!