Framed menu work on PC but not on server

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
MBreve
Beginner
Beginner
Posts: 6
Joined: Thu Mar 31, 2005 10:53 pm

Framed menu work on PC but not on server

Post by MBreve »

After trying dozens of other Javascript menus I've found Milonic to be the most promising.

I need the menu to work in two frames and in your examples there was a frame version wich works fine when oploaded without any modification.

Then I modified the paths and styles and added the normal HTML stuff. And I tested it on my PC. After hours of searching, testing and tweaking I finally got something that worked the way I wanted.

So I uploaded it to our test environement on the server.

And now it doesn't work anymore...

The top menu is shown as it should. But the submenu should appear in the other frame but it doesn't. I get an error 'Object doens't support this property or method'. I did get this error on the PC versie but solved that by moving all the .js code to the same directory as the html files. But since the menu works on the PC side but not on the server side I seem to be stuck.
I've re-tested the original sample which still works so it should be possible.

I've figured out that the problem bmust be in the mm_navframe.js file as the error messase points to this section:

function openSubmenuInFrame()
{
var selectedItem = _itemRef;
var submenuToOpen = _mi[selectedItem][3];
var targetFrame = _mi[selectedItem][35];
var mainOrientation = _m[_mi[_itemRef][0]][9]; // 0 = vert, 1 = horiz
selectedItemPos = gpos(gmobj("el" + selectedItem));
parent.frames[targetFrame].openSubmenu(submenuToOpen, selectedItemPos, mainOrientation);
}

Both IE and FireFox won't show the submenu.

For a demo go to: http://www.nomac.nl/index-milonic.htm
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

When I downloaded the page I got all the files but the mm_contentframe.js so is that on the site? When I have problems like that I put in full paths and see if that solves it. If it does it means that I have a file someplace that the page doesn't find based on the 'relative' call I had.

Ruth
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 MBreve,

Short term: Ruth is right. FireFox reports the following error when you mouse over a main menu item:

Error: parent.frames[targetFrame].openSubmenu is not a function
Source File: http://www.nomac.nl/nomac/mm_navframe.js
Line: 17

That tells me that mm_contentframe.js hasn't been loaded into your "hoofd" frame.

Slightly-longer-but-still-pretty-short term: I think that sample you tried may have gotten into the download a little prematurely. It was something we've been working on lately, but it hadn't been fully run through the paces yet and there are a couple of issues that still need to be sorted out. I think that they're pretty well sorted now. The .js modules are a little different now; in fact, it's down to one. If you can wait a little longer, I should be able to post something for you to try tomorrow.

Cheers,

Kevin
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 again MBreve,

If you're willing to be a beta tester (guinea pig), then you could try the latest incarnation. You can see it here. You'll find a download link at the bottom of the "Home" page.

If you were able to get the last one to work, without any instructions, then you should be able to get this one to work too; it contains lots of instructions.

Holler if you need help or find a problem.

Cheers,

Kevin
MBreve
Beginner
Beginner
Posts: 6
Joined: Thu Mar 31, 2005 10:53 pm

Post by MBreve »

Kevin, Ruth,

I'm going to try your suggestions in an minute but let me first thank you very much for the detailed help. Response like this makes me love the internet.

Thanks a million..

Marc
MBreve
Beginner
Beginner
Posts: 6
Joined: Thu Mar 31, 2005 10:53 pm

Post by MBreve »

Update1: It Works!

I apparently forgot to upload the mm_contentframe.js to the new directory. And since the error message pointed somewhere else I could not trace it to this problem.
But thank to you I found the Javascript Console in Firefox which will be a great help in these cases.

But now I'm tempted to get the brand new code to work. Back in a while...
MBreve
Beginner
Beginner
Posts: 6
Joined: Thu Mar 31, 2005 10:53 pm

Post by MBreve »

I just got it to work, still on the PC but I'll conitune next week and upload it.

Thanks a lot!

Marc
Post Reply