tooltips causing undefined style error on page

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
k6dyc
Advanced
Advanced
Posts: 13
Joined: Wed May 03, 2006 3:14 am

tooltips causing undefined style error on page

Post by k6dyc »

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

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

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?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: tooltips causing undefined style error on page

Post by John »

Move your tooltips call to after the call to the _data file...

Code: Select all

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

<script type="text/javascript" src="milonic_src.js"></script>
<noscript><a href="https://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.
John
k6dyc
Advanced
Advanced
Posts: 13
Joined: Wed May 03, 2006 3:14 am

Re: tooltips causing undefined style error on page

Post by k6dyc »

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

<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@deltaweathercam.com email to go over weather stuff, or visit my favorite forum, WXforum.net
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: tooltips causing undefined style error on page

Post by John »

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!
John
k6dyc
Advanced
Advanced
Posts: 13
Joined: Wed May 03, 2006 3:14 am

Re: tooltips causing undefined style error on page

Post by k6dyc »

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.
k6dyc
Advanced
Advanced
Posts: 13
Joined: Wed May 03, 2006 3:14 am

Re: tooltips causing undefined style error on page

Post by k6dyc »

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>
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: tooltips causing undefined style error on page

Post by John »

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