Tooltips not working

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
MenuFreak
Beginner
Beginner
Posts: 8
Joined: Fri Aug 21, 2009 3:58 am

Tooltips not working

Post by MenuFreak »

Hey guys me again.

I am trying to get the tooltip function to work so I followed or think I did the instructions from the Milonic site, although they seem to be kind of all over the place, there is even an instruction inside a tooltip! did not find that one for 30 minutes.

So what I need to know is if I am doing it right or am I missing a step.

I placed the tooltip.js file on my server.

Then I added the tooltip code to my menu data.

Here is were things get a bit confusing for me.

In the tooltip of the example on this page http://milonic.com/menusample6.php it says to add a line of script. But not where to add it. I added it to the same chunck of script that you place on each of your pages to call the menu, but that did not seem to work. Is that the proper place to add it?

Here is an excerpt the tutorial page. It seems straight forward.

____________________

There are 2 requirements for adding tool tips to your menus are:

* 1. Declare the tool tip in your menu item. To do this add a menu item property called tooltip=YOUR TOOLTIP TEXT HERE; to your menu items like this: tooltip=Your Text Here;
* 2. Ensure that you include the menu module tooltips.js as part of the menu definitions.

All associated code and files will be issued to you by downloading this sample

The code needed for adding tooltips to your HTML objects is:<a href="menu.htm" onmouseover="showtip('Here is some tool tip text')" onmouseout="popdown"><img src=/images/image.gif></a>

_________________________________

Just two steps, but then you get to the bottom and it starts talking about adding code to your HTML objects, is this just if you want HTML in your tooltip, or do I need to place this code someplace on the server or on my page.

I have been messing with different configurations for hours so I thought I would see if I could get some clarification.

Thanks again.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Tooltips not working

Post by Ruth »

Hi,

Sorry, I can't give you an answer to the problem unless I have the page so I can see the menu. You need to call that tooltips.js file with your milonic_src, mmenudom, menu data file and you need to put the the tooltip in your item, i.e.

Code: Select all

aI("text=I'll put a tip here;url=whatever;tooltip=This is my tooltip;");
So, if that doesn't work, I need to see the page

Ruth
MenuFreak
Beginner
Beginner
Posts: 8
Joined: Fri Aug 21, 2009 3:58 am

Re: Tooltips not working

Post by MenuFreak »

Okay here is the skinny.

The site I am experimenting on is http://redwoodsriverresort.50webs.com/html/home.html

I have the tooltip.js file uploaded to the server.

The code I have embedded in my page is:

<script tpye="text/javascript" src=""milonic.src.js"></script> <----------------This is the script it calls for you to add from the tooltip tutorial page, although looking at it now its just a copy of what is already in the code so I don't think it needs to be there. I have removed it.

<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<noscript><a href=http://milonic.com/>JavaScript DHTML menu is only visible when JavaScript is enabled</a></noscript>
<!-- The next file contains your menu data, links and menu structure etc -->
<script type="text/javascript" src="menu_data.js"></script>

Here is what my menu code looks like for my tooltip.

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
itemheight=20;
itemwidth=90;
orientation="horizontal";
screenposition="center";
top="162";
style=menuStyle;
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... tooltip=Go to the RRR Home Page;"); <------------HERE IS THE ONLY TOOLTIP CODE
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... t=Policies;");
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... text=Rates;");
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... xt=Lodging;");
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... xt=Camping;");
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... ext=Events;");
aI("align=center;overbgimage=http://redwoodsriverresort.50webs.com/h ... text=Store;");
}

And like I said before the tutorial page goes on to talk about more code that needs to be or could be used but I am kind of at a loss as to what its talking about, as it says first that you simply need to upload the tooltip.js file and then put the code in your menu data.

If you need anything else let me know and thanks again for looking at this.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Tooltips not working

Post by Ruth »

Hi,

It has to be called on the page with the menu. If you don't call it, the menu will look for tooltips.js but since it isn't listed on the page, it has no idea where it is and it will just not do anything with your aI code for tooltips

Code: Select all

<script type="text/javascript" src="milonic_src.js"></script> 
<script type="text/javascript" src="mmenudom.js"></script> 
<noscript><a href="http://websites.milonic.com/milonic.com/>JavaScript DHTML menu is only visible when JavaScript is enabled</a></noscript>
<!-- The next file contains your menu data, links and menu structure etc -->
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="tooltips.js"></script>
Nice site. You also need to get the newest version, you are down 1 level :)

Ruth
MenuFreak
Beginner
Beginner
Posts: 8
Joined: Fri Aug 21, 2009 3:58 am

Re: Tooltips not working

Post by MenuFreak »

Thanks Ruth!

I should have realized that I needed to call the tooltip.js, but the tutorial said to call the milonic.js again...guess it needs to be updated. And I just downloaded the file two days ago, wow guess I better get on it and download the latest version.

Okay going to go try and see how things work, thanks again.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Tooltips not working

Post by Ruth »

Hi,

You can go to this topic and set it to watch this topic. Then you will get a forum notification when a new version is put out.

viewforum.php?f=18

You can also take a look at http://milonic.com/tooltips.php where you can see other uses of tooltips. You can do it with text links on your page also, and even use images, like a bubble or whatever with the tip inside. View the page source and go down to where it says Tooltips can be applied to any HTML object. You'll see the menu and links below that and see how they are done

Ruth
wpatters1229
Super Advanced
Super Advanced
Posts: 90
Joined: Thu May 30, 2002 7:35 pm

Re: Tooltips not working

Post by wpatters1229 »

I have looked all over to figure out why my tooltips for my menus do not work. Can someone tell me by looking at one of my pages?
Here is the link to the page and I have all the code where it should be but it is as if I did nothing.

http://www.wwmgmt.org/stephenwellsNEWcom/billing.htm

Be aware that the menu data files are inside div tags so they show up in the correct places. I have the tooltips.js file right after the scr for the main menu js files. My menus always work just fine and this is my first attempt at using the tooltips.

I only placed the tooltips on the first two menu items on the left side. Calendar and What's New.

Thanks in advance for the help
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Tooltips not working

Post by Ruth »

Hi,

What browser is having this problem? I'm getting them in IE7, FF 1.5, 2+, 3+; NN 7.2, 9+; Safari 4+; GoogleChrome 1, and Opera 9 & 10

You have the delay set to 500, so maybe you are not over the item long enough for it to show? You can go into tooltips.js and make changes to the delay and the width.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Tooltips not working

Post by Ruth »

See previous post for response on tooltips. I noticed some things and wanted to ask you about them. I'm having problems moving into your submenu. That seems to be because you are putting all the menus, main and subs, into one file, but if you do that you are supposed to use a buildAfterLoad=true; up at the top by the delays and such, or you are supposed to but the main menu into a file by itself and call the submenus in their own file right after the body tag. The reason for this is the submenus must be built first.

The newest method is the buildAfterLoad, but I just like the old one, putting the main in it's own file and only calling that in the div. I also noticed you had things like top and left for the submenus, not sure about that, especially since if you are positioning the subs based on the parent item you need to be using top="offset=x"; now if you want the sub item to open above the parent item, then you use a minus number, so if you main item is say 20px high, then you'd have the sub set as top="offset=-20 something";

Ruth
wpatters1229
Super Advanced
Super Advanced
Posts: 90
Joined: Thu May 30, 2002 7:35 pm

Re: Tooltips not working

Post by wpatters1229 »

I actually solved the whole problem by looking at the rev level of the menu and bought the latest version...that solved the problem. The version of menu was below what the tooltips js file supported.
Post Reply