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:05
tooltips
Poster: Jaco
Dated: Monday November 1 2004 - 19:14:51 GMT
Hello, and thanks for any help. I want to add a tool tip to a menu but I have trouble with the instructions. I do not know what exactly to do with this instruction:
"Ensure that you include the menu module tooltips.js as part of the menu definitions. "
I have downloaded the tooltips.js file, but where do I put it, how do I make reference to it, what is a menu definnition,etc.?
Cheers,
Jacques
Poster: John
Dated: Tuesday November 2 2004 - 3:33:15 GMT
Sounds like some basic menu understanding (training) is in order. Start here.
As for tooltips, available from the main site off the Samples menu (or http://milonic.com/menusample6.php). You can see how the JS call works by looking at the source for that page.
Wander around a bit - you'll be amazed at home much info you'll find!
We're always here to help, but we do expect a little help from you as well...
tooltips 101
Poster: Jaco
Dated: Tuesday November 2 2004 - 11:28:20 GMT
Thanks John, I think I have managed to puzze out a few things. I need to identify the tooltips.js file as javascript in the html page where my menu is working. Then I use the showtip('hello'); command on the aI line of a menu definition in the menu_data.js file. Tried it, does'nt work.
I have menu ver. 5.1. I believe that tooltips.js does not work with ver 5.1 so I guess the next step is to obtain more recent js files of the menu system. Am I on the right track?
Jacques
Poster: John
Dated: Tuesday November 2 2004 - 13:44:43 GMT
You're getting there!
Check the top of the tooltips.js file and note that v5.16 or above is required for it to work.
Menu code files should always be kept up to current release - that's all we can support here. The current version is 5.51.
getting there slowly....
Poster: Jaco
Dated: Tuesday November 2 2004 - 15:42:34 GMT
Ok, I have the latest version and fully approved paid member. I have downloaded tooltips.js
I have inserted this javascript on my main web page
http://www.fluidedesign.com
<SCRIPT language=JavaScript src="tooltips.js" type=text/javascript></SCRIPT>
I have added this property to the menu item in the menu_data.js file:
onfunction=showtip('hello');
no go!
error message
Poster: Jaco
Dated: Wednesday November 3 2004 - 1:12:46 GMT
I am getting a script error from IE that says mm_style is undefined.
Jacques
Poster: John
Dated: Wednesday November 3 2004 - 1:59:32 GMT
Your JS calls are out of order. Remember I told you to take a look at the source for the tooltips sample page...?
Code:
<script type="text/javascript" src="/milonic_src.js"></script>
<param copyright="JavaScript Menu by Milonic - http://www.milonic.com"></param>
<script type="text/javascript">
if(parent.frames.length)top.location=document.location;
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/mmenudom.js><\/scr"+"ipt>");
-->
</script>
<script type="text/javascript" src="/menu_data.php"></script>-->
<script language=JavaScript src="/tooltips.js" type=text/javascript></script>
<param copyright="JavaScript Menu by Milonic - http://www.milonic.com"></param>
<script type="text/javascript">
if(parent.frames.length)top.location=document.location;
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/mmenudom.js><\/scr"+"ipt>");
-->
</script>
<script type="text/javascript" src="/menu_data.php"></script>-->
<script language=JavaScript src="/tooltips.js" type=text/javascript></script>
Obviously change the pathing to suit your site.
Note that the tooltips call is last, which is not the way you have it.
Poster: kevin3442
Dated: Wednesday November 3 2004 - 2:08:21 GMT
Hi Jacques,
Hope John doesn't mind if I jump in.
You're very close. Sometimes, the order in which you load .js files into a page makes a difference. In this case, there are functions used in the tooltips.js code that are defined in either milonc_src.js or mmenudom.js. So, you have to load milonic_src.js and mmenudom.js (or mmenuns4.js) before tooltips.js, so that the functions are available when tooltips.js does it's thing.
Try moving the following line
Code:
<SCRIPT language=JavaScript src="tooltips.js" type=text/javascript></SCRIPT>
down, so that it comes after you load your menu_data.js file. the menu loading part of your html page will look like this:
Code:
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="tooltips.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="tooltips.js" type=text/javascript></SCRIPT>
Hope that helps,
Kevin