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:45
openmenusbyurl.js
Poster: len
Dated: Monday January 8 2007 - 22:00:25 GMT
I have added the openmenusbyurl.js file after menu_data.js, as instructed, my sub menus are still not "holding"
This is not a registered copy I am using, trying to test to see if it will work.
http://new.idahosbdc.org
Poster: Ruth
Dated: Monday January 8 2007 - 22:55:43 GMT
Hi,
I don't know where you got the menu, but it is a very old version. You need to download the newest version. The openmenusbyurl will not work with that version. Do NOT unzip the new one to the same folder since the download would then over write your existing menu_data.js file. I would suggest for safety sake that you rename your menu_data.js file to something else i.e. sbdc_data.js or something, then you won't ever make an error and over write it with the one that comes in the test download.
http://www.milonic.com/
Then click on the Download Menu at the right side.
Once you have the new download use the 3 base files milonic_src.js mmenuns4.js mmenudom.js. Your openmenusbyurl.js should then work. It will not work with a menu older than version 5.62.
You might have to change the link text to DHTML Menu by Milonic.com to prevent the 1st item from becoming Milonic.
One more thing, since you have the menu in a table, and are putting all the files into the table, you need to add buildAfterLoad=true; up at the top section, the section with the _subOffsetTop etc. Then in the main menu, remove the top position and add position='relative'; This is necessary if you want the menu in a table or div.
Ruth
Error
Poster: len
Dated: Tuesday January 9 2007 - 0:00:24 GMT
OK, got part of it, getting an error on pages, is that from the variables in the URL??
as in
http://new.idahosbdc.org?fuseaction=con ... ew&page=32
Poster: Ruth
Dated: Tuesday January 9 2007 - 1:32:26 GMT
Hi,
First the error is from the init in the body tag, whatever that's supposed to be it's not happening, the error message is init is undefined. Isn't that supposed to initiate some kind of function? I don't see anything for it to init.
As to the menu, I think you mixed up the two different methods for doing the relatively positioned menu. In the method you are using, you need to put the submenus back in the data file. Because you are putting the buildAfterLoad=true; you wouldn't put the submenus in a separate file. That's only when you don't use that method, you'd put the main in its own file and call it in the table cell, and then call all the other files 1st thing after the body tag. So, just put the submenus and the styles for them back in the file.
Finally, there are a couple of other changes you need.
1. Remove the keepalive=1; from all the submenu styles and put it in the main menu style. Keepalive functions from the menu that opens the one you want to keep alive.
2. Although it shows correctly in IE by using the top= in the submenus to fine tune them, it will not show that way in all browsers. The property you need is top="offset=";
This property can also take negative numbers. Because you are using images that makes it fairly easy. Since I had to check it, I did them so am posting them here.
Code:
with(milonic=new menuname("about")){
style=menuStyle1;
top="offset=5";
with(milonic=new menuname("biz")){
style=menuStyle2;
top="offset=-18";
with(milonic=new menuname("invent")){
style=menuStyle3;
top="offset=-33";
with(milonic=new menuname("train")){
style=menuStyle4;
top="offset=-29";
with(milonic=new menuname("online")){
style=menuStyle5;
top="offset=-56";
with(milonic=new menuname("faq")){
style=menuStyle4;
top="offset=-82";
with(milonic=new menuname("staff")){
style=menuStyle3;
top="offset=-93";
style=menuStyle1;
top="offset=5";
with(milonic=new menuname("biz")){
style=menuStyle2;
top="offset=-18";
with(milonic=new menuname("invent")){
style=menuStyle3;
top="offset=-33";
with(milonic=new menuname("train")){
style=menuStyle4;
top="offset=-29";
with(milonic=new menuname("online")){
style=menuStyle5;
top="offset=-56";
with(milonic=new menuname("faq")){
style=menuStyle4;
top="offset=-82";
with(milonic=new menuname("staff")){
style=menuStyle3;
top="offset=-93";
Hope this helps.
Ruth
thanks
Poster: len
Dated: Tuesday January 9 2007 - 2:41:08 GMT
Thanks, Ruth... I started taking things apart and did not get them back together before I had to leave. The submenus and main menu will be int he same file
Thank You
Poster: len
Dated: Tuesday January 9 2007 - 20:56:32 GMT
Ruth, thank you for all your help, we are just about there
When I click on one of the submenu items is there a way to keep the submenu active? I have the addition module there and have it set before the data file, but it does not bring up the sub menu when I go to one of the sub menu pages
Poster: Ruth
Dated: Wednesday January 10 2007 - 2:04:08 GMT
Hi,
Try putting the openmenusbyurl.js file after the menu_data.js file.
Ruth
switching
Poster: len
Dated: Wednesday January 10 2007 - 3:20:17 GMT
I thought I had tried that, but did try again, no dice
Poster: Ruth
Dated: Wednesday January 10 2007 - 5:37:29 GMT
Hi,
I will post to Milonic because this is beyond what I know. It's probably going to be something to do with that ?fuseaction=content etc. about which I don't have knowledge. It does work, but I had to save that consulting page as a regular page without the ? in it since I can't save with the ?
Ruth
Thanks
Poster: len
Dated: Wednesday January 10 2007 - 15:16:45 GMT
the ? is what may be causing the problem -- not something that I can get around
If we can make it work we have a second site at the university where we would like to use the menu. Both site belong to Boise State University... perhaps you have heard about our undefeated football team and blue turf
Poster: Andy
Dated: Wednesday January 10 2007 - 23:45:24 GMT
Hi,
Just stepping in here - I can confirm that it's not the URL query string part causing the problem it's something else.
Not suite sure what yet but the links are matching fine.
I'll be back,
Andy
Poster: Andy
Dated: Wednesday January 10 2007 - 23:48:13 GMT
Told you I'd be back
Just cracked it - The problem is the ./ in front of the file names.
The menu is trying to match ./index.cfm with /index.cfm which is the same things but not a perfect match.
You really don't need the ./ as it's the same as not including it so if you get rid of them, matching should start to happen
Hope this helps,
Andy
works!
Poster: len
Dated: Thursday January 11 2007 - 0:21:26 GMT
I can not seem to predict when it happens but 1 out of 15-20 times I get a Internte Explorer can not open... it goes to their weird can not find page, then if I refresh the page comes up... could that be from clicking too fast?
Poster: Ruth
Dated: Thursday January 11 2007 - 1:16:25 GMT
Hi Len,
It's the fact that you are using the buildAfterLoad=true; method for setting up the relative positioned menu. Using this method means that the whole page loads fully before the submenus load so the menu is not really available for use until the page is fully loaded even though you see the main menu. If you can use the old method you shouldn't have that problem because it builds the submenus 1st before the main menu gets built so the submenus are available when the main menu is finally build. I hope that made sense.
If you can use the old method you would remove the buildAfterLoad=true; from the file, then you would cut out the main menu and paste it into its own file. Add a drawMenus(); at the end of that main menu file. You now have two data files, one with all the styles and subs and one with only the main menu. Both files contain a drawMenus();
You call all the program files and the menu_data.js file the 1st thing after the body tag and you call the main data file you created in the table cell.
Hope that made sense, for more information on relative menus see
http://www.milonic.com/tablemenu.php
Ruth
You guys are
Poster: len
Dated: Thursday January 11 2007 - 1:32:51 GMT
Awesome in your support! Got that working, we will see how it goes, eh?