Javascript Conflict - PLEASE HELP - example included

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
Kramer
Beginner
Beginner
Posts: 3
Joined: Thu Sep 05, 2002 2:46 am

Javascript Conflict - PLEASE HELP - example included

Post by Kramer »

Hi,

I posted earlier about a conflict I was having. In this case, the menu fails but the other script works. You can see a super stripped down version of my web page here:

http://www.monmouth.com/~jkramer/test.htm

If anyone can help I'd really appreciate it!

Thanks!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Kramer,

First thing I'd suggest is to try putting the two lines that load the menuing system:

<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>

into the <BODY> section. You currently have them at the end of your <HEAD> section, and it seems that many of the posts in these forums mention clearing up various problems by putting these lines in the <BODY>. In fact, all of the examples I have looked at on the Milonic website put these lines in the <BODY>. I recall reading somewhere that recent versions make placing these lines in the <BODY> unnecessary, but it still seems to be the mwthod of choice for users and examples alike.

If that doesn't work, you'll have to check for direct conflicts; I'd start with global variable definitions.

Good Luck,

-- Kevin
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I agree with Kevin on moving your calls to the <body>. Note also that there have been a number of posts here concerning conflicts with other scripts (some from me!). So far no definitive answer.
John
Kramer
Beginner
Beginner
Posts: 3
Joined: Thu Sep 05, 2002 2:46 am

Post by Kramer »

I did try moving the references to the menu all over the document. Didn't work.

I should also add that I tried to find overlapping variables. I gave a cursory look (i'm not really a developer by any means), and only found the variable "lyr" in both. I then changed every occurrence of lyr in the other script to "lyrx," which you see if you look at my example page.

I suppose I could open the scripts in Visual Studio or something, but I'm not really sure what I'm looking for.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Unfortunately we're both in the same boat, then. It's not all other JS that fails with the menu, so I haven't been able to find anything common. Have some messages in to Andy about the problems, but he's going to be busy with 4.0 development when he gets back. Hopefully something will fall into place there.
John
Post Reply