Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:48

tooltip code


Poster: mfurf
Dated: Friday April 1 2005 - 23:10:21 BST

How is the tooltip code supposed to read?

I've tried
Quote:
onmouseover=showtip('hello');
and
Quote:
onfunction=showtip('hello');
and don't get the "hello".

I've got the 1.3 tooltips and version 5.717 /mfurf


Poster: kevin3442
Dated: Saturday April 2 2005 - 1:23:53 BST

Hello menufurfer,

Long time, no furf... ;)

The correct syntax depends on what sort of thing you're mousing over. Suppose you want to open the tooltip when you mouse over a menu item. That item's aI() string would include onfunction=showtip('tip text');, sort of like so
Code:
aI("text=Item Text;utl=whatever.htm;onfunction=showtip('tip text');");

The onfunction property is unique to milonic menus; it's not a general html thing.

Now suppose you want to open a tooltip when you mous over a static text link. To do that, you'd use the javascript event called onmouseover, like so:
Code:
<a href="http://www.ohsaratoga.com/" onmouseover="showtip('tip text')">Click here</a>


You would use the same onmouseover="showtip('text')"syntax to add a tip to any html object that supports the onmouseover event; an image, a clickable image, etc.

Cheers,

Kevin


Poster: mfurf
Dated: Saturday April 2 2005 - 1:50:08 BST

Quote:
Hello menufurfer,

Long time, no furf... Wink ;)

Kevin: What a great memory, recalling my full handle, not just the shorthand mfurf. What do you eat for breakfast that I might have some too?

Well I've tried it but can't seem to show the tool tip either in Firefox or IE 6. Here's my line: what am I missing? I copy and pasted it right from your text above.
Code:
aI("text=Prepare With Prayer;url=Chapel.html;onfunction=showtip('tip text');target=_blank;");


/mfurf


Poster: Ruth
Dated: Saturday April 2 2005 - 4:16:32 BST

I just tried it with the download sample for 5.719. I don't have IE6 but it works in Firefox 1.0.2. Did you put the call for the tooltips.js file right after the menu_data.js file?

Ruth


Poster: kevin3442
Dated: Saturday April 2 2005 - 5:54:15 BST

mfurf wrote:
...What do you eat for breakfast that I might have some too?

Lately, it's been a nice, healthy breakfast of Girl Scout cookies. Love those things! Especially the lemon ones. It's a sacrifice that I make each year for a worthy cause. ;)

Ruth has nailed it, as usual:
Ruth wrote:
Did you put the call for the tooltips.js file right after the menu_data.js file?

The example code you posted (for the "Prepare with Prayer" item) is in bigscroll_menu_data.js, which defines your scrolling menu and its submenu. bigscroll_menu_data.js is loaded into main.htm, which in turn is loaded into your "main" iframe. So far so good. The problem is that main.htm does not load tooltips.js. Without tooltips.js loaded into the page, showtip() will not work for any object in that page, menu item or otherwise.

I see that your logo.htm file does load tooltips.js. In that case, however, the effectiveness of tooltips.js is limited to the "logo" iframe that contains it. To have tootltips in the other iframe, you must load tooltips.js there also. Load tooltips.js into main.htm, and you should be tipping away in no time. Remember that you can use the tooltips on other objects as well, not just on menu items.

Cheers,

Kevin


Poster: mfurf
Dated: Sunday April 3 2005 - 6:59:55 BST

You nailed it Kevin. In another chain with Ruth we noted the lliabilities of having the milonic calls in the logo iframe versus the index file where I have always had them, just to accommodate the Opera browser., i.e. the submenus in part disappear "behind" the main iframe.

So I switched them back and now I don't lose parts of the submenu behind the iframe. At certain resolutons it's possible to discern the submenus "moving" the iframe a tad to the right. Which is fine. Pass the lemon cookies.

/mfurf


Poster: mfurf
Dated: Sunday April 3 2005 - 7:02:26 BST

By the way does tooltips allow for positioning coordinates? /mfurf


Poster: Ruth
Dated: Sunday April 3 2005 - 8:04:38 BST

I think if you look in the tooltips.js file there are color, fontsize and things, and if I remember correctly there are offset position parameters. I haven't looked at it in awhile and don't seem to have one on my computer :oops:

Ruth