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

Framed menu work on PC but not on server


Poster: MBreve
Dated: Thursday March 31 2005 - 23:06:36 BST

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


Poster: Ruth
Dated: Friday April 1 2005 - 4:25:59 BST

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


Poster: kevin3442
Dated: Friday April 1 2005 - 10:33:06 BST

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


Poster: kevin3442
Dated: Friday April 1 2005 - 11:25:17 BST

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


Poster: MBreve
Dated: Friday April 1 2005 - 18:47:53 BST

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


Poster: MBreve
Dated: Friday April 1 2005 - 19:00:24 BST

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...


Poster: MBreve
Dated: Friday April 1 2005 - 21:23:24 BST

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

Thanks a lot!

Marc