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:22

tooltips causing undefined style error on page


Poster: k6dyc
Dated: Wednesday February 13 2008 - 5:29:29 GMT

after installing tooltips I get an error on my pages saying 'Line 22, char 1, mm_style is undefined. This seems to relate directly to the tooltips.js file definition for the mm_style which is included in my page just after my head with my other menu files:

Code:
<script type="text/javascript" src="tooltips.js"></script>
<script type="text/javascript" src="milonic_src.js"></script>
<script   type="text/javascript">
   if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");      
     else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>


I am runnning v5.790 of all files. Here is an example tooltip:

Code:
with(milonic=new menuname("Weather")){
style=subStyle;
aI("tooltip=A near real time display of the data as it is received from the weather sensor suite;image=mml16.gif;url=index.php?page=wdl;text=Interactive Live Display;");


My site is at http://deltaweathercam.com Any ideas?

Re: tooltips causing undefined style error on page


Poster: John
Dated: Wednesday February 13 2008 - 17:00:50 GMT

Move your tooltips call to after the call to the _data file...
Code:
<script type="text/javascript" src="milonic_src.js"></script>
<script   type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>   
<script type="text/javascript" src="tooltips.js"></script>

Also, if you're not supporting NS4 you can use the 'new' calls...
Code:
<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="http://www.milonic.com/">JavaScript DHTML Menu Powered by Milonic</a></noscript>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="tooltips.js"></script>

On a side note, what equipment are you running? I ask because of this. I run Davis Vantage Pro2. It sometimes loads a bit slower than I'd like because of some external links I call.

Re: tooltips causing undefined style error on page


Poster: k6dyc
Dated: Wednesday February 13 2008 - 18:16:20 GMT

Thanks for the reply John. I have tried changing my order of calls for the sources and removed the NS4 check, but I still have an issue. My calls now look like:

Code:
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>
<script type="text/javascript" src="tooltips.js"></script>


However, I still get an error on the page, it says: 'Line 90 char 2 Object Required' Ther error doesn't appear until I mouseover the menus, and also my menus no longer expand/drop down. Hmmmm. If I remove the tooltips.js source all is well.

Not to hijack this thread off-topic, but your weather site is now part of USAWeatherFinder.com. I currently run a VP but have a VP2 ready to be installed, just need some time. You can reach me at my rheming __at__ deltaweathercam.com email to go over weather stuff, or visit my favorite forum, WXforum.net

Re: tooltips causing undefined style error on page


Poster: John
Dated: Wednesday February 13 2008 - 18:21:51 GMT

I'll take another look. Sometimes trying to do this while at work is a bit tough (this position with Milonic is strictly volunteer - neither Ruth nor I work for them).

Got the code - it will be posted today.

Here's another twist to this thread (if I read your username right) - w7jkg!

Re: tooltips causing undefined style error on page


Poster: k6dyc
Dated: Wednesday February 13 2008 - 20:27:01 GMT

I have removed the tooltips.js because it prevents my menus from dropping down. We can do this via phone if you like, hit me with an email and I'll send you the number.

Re: tooltips causing undefined style error on page


Poster: k6dyc
Dated: Thursday February 14 2008 - 4:13:03 GMT

OK, the solution is to place the tooltips.js source AFTER the milonic_src and mmenudom sources, but before the menu_data.js source:

<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="tooltips.js"></script>
<script type="text/javascript" src="menu_data.js"></script>

Re: tooltips causing undefined style error on page


Poster: John
Dated: Thursday February 14 2008 - 14:24:07 GMT

Interesting. The Milonic home page has it after the _data file. However, whatever works. Glad you got it.

Apologies for not getting back to you - been out.