View Full Version : Regarding Image w/description tooltip script

01-23-2007, 12:15 AM
1) Script Title: Image w/descrption tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm#

3) Describe problem: Am building this page with FrontPage02 and have already
uploaded appropriate folder to my web, with the images this is intended for. Visit my http://www.cartoonfile.net/fishing_cartoons.htm and see where I have inserted the DD code into appropriate position. Question is what specific part of code do I go to, to edit with my intend image files? I have each image identified as: fishing cartoon1,fishing cartoon2 etc. in the folder (all as gifs) so want to have each image pop up when someone mouses over the blue text.

01-23-2007, 12:18 AM
In the script look for the following items:

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing:
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
messages[1] = new Array('duck2.gif','Here is a duck on a light blue background.',"#DDECFF");
messages[2] = new Array('test.gif','Test description','black','white');

//////////////////// END OF CUSTOMIZATION AREA ///////////////////

This is where you edit the images/descriptions.
Hope this helps.

01-23-2007, 01:34 AM
Thank you. Each image in my folder of images is id'd as fishing-cartoon1.gif, fishing-cartoon2.gif etc. All 49 of them in the folder. I went into the code where you highlighted in red and on first part: // tooltip content goes here (image, and I did this:
// tooltip content goes here (fishing-cartoon1.gif but when I went to preview, the intended image did not pop up. See my link: http://www.cartoonfile.net/fishing_cartoons.htm . Doing this first part as initial experimentation to see if this will work. Btw, is this OK for Internet Explorer6?

01-23-2007, 01:38 AM
Ok, let me fix this problem. Take a look at the highlighted parts in the below code. This is the part that you will need to change.

messages[0] = new Array('yourimage.gif','Here is a red balloon on a white background',"#FFFFFF");

Just use the above as a template for the rest of the code. Sorry I did not make that clearer in my previous post.

Hope this helps.

01-23-2007, 02:59 AM
......I change that and added fishing-cartoon1.gif into that area of my code and the image still does not pop up, I did highlight Fishig Cartoon1 on that specific page & make it as an actual hyperling to fishig-cartoon1.gif also. Maybe the code doesn't work in IE6?

01-23-2007, 03:08 AM
Check and make sure the path to fishing-cartoon1.gif is correct. When I click on the link, it takes me to the 404 Error (File Not found) Page.

Hope this helps.

01-23-2007, 03:26 AM
So far as checking my "file path", how is that achieved? I'm attaching a screen shot, where normally I'd go to bottom area where it says ADDRESS and type in fishing-cartoon1.gif but that did not work.

01-23-2007, 03:29 AM
Ok, not sure how you would do it in Frontpage, but the file path is basically the directory that you uploaded the images/content to. The way that you are pointing to them in the script is basically saying to go to the root directory of the website. But if you look there for them, they are not there. If you were to either upload your images to the root (main) directory folder for you website [this would be listed as "public_html", "www", "web", etc], or change the paths in the script to point to where you already have the images uploaded to, then the script will work.

01-23-2007, 03:56 AM
thanks for the help. As you will see by the attached screenshot, I already have the folder of images in my root directory where I put a green arrow (on left of shot) up to that particular folder. FrontPage is a WYSIWYG . . . one of the simplest editors out there, so manipulating / adding code is relatively simple. This particular one seems a bit baffling. Not sure it will work, although the way the script offered images in mouseovers intrigued me . . .