tooltip code

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mfurf
Super Advanced
Super Advanced
Posts: 74
Joined: Tue Sep 23, 2003 12:30 am
Location: Purling NY
Contact:

tooltip code

Post by mfurf »

How is the tooltip code supposed to read?

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

I've got the 1.3 tooltips and version 5.717 /mfurf
Oh Saratoga!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

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: Select all

<a href="http://websites.milonic.com/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
mfurf
Super Advanced
Super Advanced
Posts: 74
Joined: Tue Sep 23, 2003 12:30 am
Location: Purling NY
Contact:

Post by mfurf »

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: Select all

aI("text=Prepare With Prayer;url=Chapel.html;onfunction=showtip('tip text');target=_blank;");
/mfurf
Oh Saratoga!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
mfurf
Super Advanced
Super Advanced
Posts: 74
Joined: Tue Sep 23, 2003 12:30 am
Location: Purling NY
Contact:

Post by mfurf »

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
Oh Saratoga!
mfurf
Super Advanced
Super Advanced
Posts: 74
Joined: Tue Sep 23, 2003 12:30 am
Location: Purling NY
Contact:

Post by mfurf »

By the way does tooltips allow for positioning coordinates? /mfurf
Oh Saratoga!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
Post Reply