View Full Version : tooltip confusion and problems

03-30-2006, 10:09 PM
hi there,

I am trying to use the tooltip to display a larger image when you hover over the smaller image.

however when i use just a bog standard html page, all is cool and larger image appears.

however, if i am to add it to my actual working page, i get nothing despite using the code, the div, the css provided and no changes.

here is my page

http://www.shopocart.com/viewItem.asp?idProduct=18 is the url
the image should show when you hover over the main image.

the javascript is http://www.shopocart.com/images/pop.js

my display div is outside any other div, or float and everything, you will find this at the bottom of the source just before </body></html>

I think this is a really cool idea, and i would be very grateful for any help to get this working.

many thanx

dave UK

03-30-2006, 10:25 PM
These are errors for the page in FF. The second one tells me that is likely that the code got transformed somehow as &amp;&amp; should be simply &&. Once the script parser finds an error like that it stops so, there are probably many more errors like it. How did you add the code to your page? A text editor is best.

Error: preloadImages is not defined
Source File: http://www.shopocart.com/viewItem.asp?idProduct=18
Line: 1

Error: missing ) after condition
Source File: http://www.shopocart.com/images/shopocart.js
Line: 4, Column: 65
Source Code:
if (init==true) with (navigator) {if ((appName=="Netscape")&amp;&amp;(parseInt(appVersion)==4)) {

03-30-2006, 10:30 PM

03-30-2006, 10:34 PM
well i would like it to be that, but the javascript source is in pop.js
and i have run the site with just that one only incase there was a var clash or something.

but still dont work mate



03-31-2006, 03:16 AM
I'm sorry but, I still don't know how you added the script. What kind of editor did you use? Why would or how could && be changed to the HTML entities &amp;&amp;? It might not be your editor, if it isn't or even if it is, to make the script work, we need to find out how it happened and prevent it from happening.

03-31-2006, 07:03 AM
hi, all javascript is done in notepad.

the shopocart.js script is a totally none related matter, but the amp; rather than & thing is because on my normal pages i work of the remote server with dreamweaver.

i did a mass change for & to amp; not realising what i was doing, the shopocart.js script was one of the victims i hadent reversed.

this has now been resolved, but i still have my totally unrelated problem with the tooltip.

03-31-2006, 07:17 AM
ya know what, after all this.

it appears that you have to load up the div before the javascript
otherwise document.all doesent work, bit of a pain like as now my javascript has to be loaded into my footer.

is there a fix around this, like a refresh of the javascript????