| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Javascript Tooltip Problem | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() 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!!!!!
__________________
Versions 4.1.11 to 4.6.4 ... when will the new versions end! ![]() Custom X-Cart driven e-commerce sites, skins and installations at www.samsonwebdesign.co.uk |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() 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/
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Quote:
Awesone. That works fine now. I knew it would be something simple but couldn't see the wood for the trees! ![]() Thanks.
__________________
Versions 4.1.11 to 4.6.4 ... when will the new versions end! ![]() Custom X-Cart driven e-commerce sites, skins and installations at www.samsonwebdesign.co.uk |
|||||||||
#4
|
|||||||
|
|||||||
![]() 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>
__________________
JOHN - v.5.3.X biz, X-payment 3.X |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Should be something like this Code:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#6
|
|||||||
|
|||||||
![]() thanks Vic, for the advice, tried, still not working, however found a similar, but not as fancy.
__________________
JOHN - v.5.3.X biz, X-payment 3.X |
|||||||
#7
|
|||||||||
|
|||||||||
![]() 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.
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#8
|
|||||||
|
|||||||
![]() You are correct, that's the problem , I put it in the inaccessible directory! Thanks so much for helping!
__________________
JOHN - v.5.3.X biz, X-payment 3.X |
|||||||
|
|||
X-Cart forums © 2001-2020
|