-
Image w/ description tooltip All
Image w/ description tooltip All
http://www.dynamicdrive.com/dynamici...agetooltip.htm
Need help with following script ->
my images doesnot show up like sticky´s but opens up a new window.
What is wrong?
Confused...
1) should I have the html. and the images in the same folder?
2) where do I change and add images in the script?
ex1->
<a href="#" onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Link 1</a>
should it be:
<a href="/images/myimage.jpg" onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Link 1</a>
And should that go with following code ->
messages[1] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
-------->
Need help to understand in wich direction to move my brain...
-
-
First, you can have the images anywhere you like, you'll just have to specify that in the code.
Second, this:
<a href="#" onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Link 1</a>
Should not change. In the part "doTooltip(event,1)", the number one tells it to look for messages[1]. Had that been a 2, it would look for messages[2], and so on and so forth.
So, to add your images (which is obviously the thing that would make sense) you change this:
messages[1] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
To:
messages[1] = new Array('./myImage1.jpg','This Is My First Image',"#FFFFFF");
messages[2] = new Array('./Images/myImage2.jpg','This is My Second Image',"#FFFFFF");
Get it? Now, notice how I put ./ in front of my image names? This basically starts it in the same folder as my html file. So if my HTML file is in D:\Web, so is image1. And that puts image2 in D:\Web\Images
Make any sense? If you need me to clear anything up, just ask.
-
-
I dont get it, sorry!
1).<a href="#" onmouseover="doTooltip(event,1)" onmouseout="hideTip()">Link 1</a>
I have tried this one both with "#" and with "/images/myimage.jpg" - NO luck!
2).messages[1] = new Array('./myImage1.jpg','This Is My First Image',"#FFFFFF");
I have tried this one with both your way and just:
messages[1] = new Array('image1.jpg' ) -> NO luck!
3) I have checked the code a "million of times" ??? The script is as it should be before </head> , the link is where the Link 1 is and the last...
<!-- start image mouse II-->
<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>
<!-- end image mouse II-->
</body>
is where it should be.
4) I have also tried combinations of where I have my images in FTP and my html... same folder, image folder ( then I wrote than the path /image...)
I dont get it . Does not function for me, do you mind to try help me again.
Thanks in advance for help already given.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks