Incompatibility with Google Map?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jcorning
Beginner
Beginner
Posts: 4
Joined: Sun Feb 04, 2007 7:55 pm

Incompatibility with Google Map?

Post by jcorning »

I've been very happy with the Milonic menu, but today I tried to add a Google Map to my project. When I include the <script> tag pointing to the Google Map library, I get an error when the Milonic menu tries to load: Microsoft JScript runtime error: 'ns4' is undefined.

Is there an incompatibility here, or am I doing something wrong?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

The menu should work fine with Google Maps, has been done in the past.

Looks like a file location problem to me
jcorning
Beginner
Beginner
Posts: 4
Joined: Sun Feb 04, 2007 7:55 pm

Post by jcorning »

What do you mean by "file location problem"?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

If you see the error "'ns4' is undefined." then this must mean that the file milonic_src.js has not been executed because the ns4 variable is set to either true or false within that file.

So, my guess is that the browser cannot find the menu code files and this is the reason for the error
jcorning
Beginner
Beginner
Posts: 4
Joined: Sun Feb 04, 2007 7:55 pm

Post by jcorning »

Why would adding a <script> tag referencing the Google Maps API cause it to stop executing the Milonic script? When I add the Google reference I get this error; when I remove it the Milonic menu works fine.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

How 'bout a URL so we can see what's going on?
John
jcorning
Beginner
Beginner
Posts: 4
Joined: Sun Feb 04, 2007 7:55 pm

Post by jcorning »

The URL is http://www.x4gl.com

But now it works. I put the <script> tag back in that pointed to the Google library, but in a slightly different position, and then compiled the VB.NET project in RELEASE mode. I'm not sure which change made the difference, but when I installed it on my hosting site everything works.

It still bombs when I run it in debug mode on my development PC, but I guess I can live with that.

Thanks for your suggestions!
Post Reply