![]() |
Javascript Tooltip Problem
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:
Then implemented the call to mouseover for the tooltip on the link as follows: PHP Code:
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!!!!! |
Re: Javascript Tooltip Problem
As you wrap code with {literal} {$SkinDir} variable won't be replaced with its content.
So remove literal - it is not required in your case. External js file linked with script tag is not parsed by Smarty. I believe that you placed this script in skin1/modules/wz_tooltip/ |
Re: Javascript Tooltip Problem
Quote:
Awesone. That works fine now. I knew it would be something simple but couldn't see the wood for the trees! :roll: Thanks. |
Re: Javascript Tooltip Problem
I am using the same script, however I am putting it in the embedded static page. It is not working if I put the script in skin1/modules/Tooltips/wz_tooltip (see the code below) , but it will work fine if I have all the codes in the page content ... meaning - a big long inefficient way of coding.
Any advice? Thanks ************************************************** ******* code: <body>{literal} <script type="text/javascript" src="http://www.reallycooltees.com/public_html/modules/Tooltips/wz_tooltip.js" > </script> {/literal} <a href=" " onmouseout="UnTip()" onmouseover="Tip('Why do we charge your art fees?')" >$30.0/hour</a> </body> |
Re: Javascript Tooltip Problem
Should be something like this Code:
/skin1/modules/Tooltips/wz_tooltip.js |
Re: Javascript Tooltip Problem
thanks Vic, for the advice, tried, still not working, however found a similar, but not as fancy.
|
Re: Javascript Tooltip Problem
Is this file located in the directory public_html/skin1/modules/Tooltips/ on your server currently?
not in public_html/modules/Tooltips/ - this directory is not accesible from the web. |
Re: Javascript Tooltip Problem
You are correct, that's the problem , I put it in the inaccessible directory! Thanks so much for helping!
|
All times are GMT -8. The time now is 06:00 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.