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

Little bug with menu and IE : still having the bug...


Poster: maitredede
Dated: Wednesday June 1 2005 - 15:09:57 BST

Hi

I'm continuing this post : http://www.milonic.com/forum/viewtopic.php?t=5968

I have the latest version of the menu

The bug is when I click forward on IE toolbar, and then backward, the menu is on the page, but stills inactive... This problems has appeared on three differents computers. I think it may come from the script I have on my pages, but I don't know why this happens

Link : http://metm.no-ip.org


Poster: Ruth
Dated: Wednesday June 1 2005 - 17:38:40 BST

Hi,

1. I can't find the iframe function on the page that is supposed to be used with Milonic. You need that function there before the iframe
Code:
<script>
function openIFrame(iFrameId,winURL)
{
ifId=gmobj(iFrameId)
ifId.src=winURL
}

</script>
Maybe it's there and I'm just not seeing it.

2. You have the menu in a table, but the problem is you are supposed to call the files, the milonic_src.js mmenudom.js and mmenuns4.js the first thing right after the body tag, I think you are also supposed to call the file that has the menu styles and submenus at that point also.

3. You have that table in a div and you are not supposed to put the menu in a div. Most people use the center tags to center the table, or align=center in the table tag.

Ruth


Poster: maitredede
Dated: Friday June 3 2005 - 10:57:41 BST

1. The function is in the file '/script/gal_scrip.js' called in <head>

2. I generate the menus with php, from your sample files. So I will rewrite some code to call the files at the right place. But why should I put my menu definition (styles, submenus) just after the body tag ? Is it so different ? I'll try. But what is the correct order ?
Code:
<body>
menu scripts
menus style
submenu
<table>
...
<td>
menu1
drawmenus()
...
<td>
menu2
drawmenus()


3. ok.


Poster: maitredede
Dated: Friday June 3 2005 - 12:46:58 BST

I've rewrited my code to meet the 'first thing right after the body tag' condition. Still not working... :cry:


Poster: Ruth
Dated: Friday June 3 2005 - 18:19:36 BST

Hello,

maitredede wrote:
I generate the menus with php, from your sample files. So I will rewrite some code to call the files at the right place. But why should I put my menu definition (styles, submenus) just after the body tag ? Is it so different ?


Yes, it is different. I am not a code person, however the explanation provided when placing the menus in a table is that the menu files must be the first thing before any other html objects are rendered.

The Milonic site uses php, I don't know much about it, but they rename their menu_data.js file to menu_data.php something about it being parsed by the php or something. So, I'd think you could put all your style and subemnus back into the menu_data.js file and rename it menu_data.php and just call it right where the other menu program files are, right after the body tag.

As to the problem that was the main issue. I finally noticed something [sorry, it takes me awhile, I'm not a programmer or code person to know immediately what might cause a problem] Anyway, in your main menus, the ones in the tables you have
Code:
position="static";
you need
Code:
position="relative";
Once I did that, when I moused over items the colors changed immediately showing the on colors and the submenu opened.

Ruth


Poster: maitredede
Dated: Tuesday June 28 2005 - 12:40:45 BST

Sorry for replying so late, i've tested your solution just now.

It seems that there is no more this problem. I've put the menu into "relative"...

Thanks.

Re: Little bug with menu and IE : still having the bug...


Poster: bpolackoff
Dated: Monday January 7 2008 - 0:52:20 GMT

I have run into the problem myself with the menu becoming inactive when you use the Position='static' and I have also found that when changed to position='relative' the menu behaves as expected.

But here I my current problem. When I switch the menu back to position='relative' then resize the window, the menu stays in it's original location (it does not move with the rest of the site). It stays in the location on the screen the menu was first loaded.

Any ideas?

Re: Little bug with menu and IE : still having the bug...


Poster: Ruth
Dated: Monday January 7 2008 - 1:19:18 GMT

Hi,

We would need to see the page to see what's happening. If you have it positioned relatively in a table or div then it should move with the container

Ruth

Re: Little bug with menu and IE : still having the bug...


Poster: bpolackoff
Dated: Monday January 7 2008 - 1:21:20 GMT

Here is the example. Thanks for the quick reply

http://sb.centuron.net/

Re: Little bug with menu and IE : still having the bug...


Poster: Ruth
Dated: Monday January 7 2008 - 2:54:41 GMT

Hi,

OK, there are a few areas about which I'll post with a solution for each thing. Sorry it is so long. I tend to try and give extra - complete answers :)

1. The menu is not put in the table correctly. There are two ways you can do it. The new method uses a buildAfterLoad=true; at the top of the data file, in the same area as the subOffsets listing. But, there are problems with this in some browsers or site setups. So, I am posting the old method here. You can see examples of the two methods here, Method 1 is the new one, and Method 2 the old. You dont' have to use the names given for the files, of course.

http://support.milonic.com/beginners/ta ... /index.htm

Open your menu data file and cut out the main menu. Paste that main menu in a separate file and add a drawMenus(); at the end of it, then save it as main_data.js or main_embed.js or whatever you want to call it. Now save your menu_data.js file without the main menu in it, but with the drawMenus(); at the end just like it is now. The only thing you remove is the main menu. You now have two files. Call the menu_data.js file up with the milonic_src.js and the mmenudom.js files, the first thing after the body tag, and call the main data file where you are now calling the menu_data.

If you must call the js files in the HEAD section of the page, then you will probably have to use the new method, though many use the old one and put the calls in the head. However, it is stated they must be called first thing after the body tag. If you use the new method, you would then add the buildAfterLoad=true; at the top of the data file, and you would call all the milonic files in the table cell

Code:
<TD>
           <SCRIPT src="milonic_src.js" type=text/javascript></SCRIPT>

<SCRIPT src="mmenudom.js" type=text/javascript></SCRIPT>
<SCRIPT src="menu_data.js" type=text/javascript></SCRIPT>
          </TD>
You can see examples of the two methods, Method 1 being the new one, and Method 2 the old. You dont' have to use the names given for the files, of course.

http://support.milonic.com/beginners/ta ... /index.htm


2. This is not an error, but since you cannot control how table cells shift as you resize a window with the mouse, it would be better to remove the left and right images from the cells on either side of the menu and put them in the menu itself. The main menu would then be

Code:
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
position="relative";
margin=2;
orientation="horizontal";
style=Big;
aI("image=menu_r1_c1.jpg;itemwidth=9;type=header;");
aI("text=Home;url=http://sb.centuron.net");
aI("showmenu=About;text=About;");
aI("showmenu=Search;text=Search;");
aI("showmenu=Buyers;text=Buyers;");
aI("showmenu=Sellers;text=Sellers;");
aI("showmenu=Resources;text=Resources;");
aI("showmenu=Login;text=Login;");
aI("text=Contact;url=contact.cfm;");
aI("image=menu_r1_c5.jpg;itemwidth=9;type=header;");
}


Because it is set as type=header the mouse will not react if it goes over those items. Because these end items are now in the menu when the page is resized with the mouse everything moves together instead of showing that empty area during the move.

3. If you do it this way, you need to change the menubgimage="menu_r1_c3.jpg"; to bgimage="menu_r1_c3.jpg"; This will keep that square edge from appearing in the 1st and last header items. menubgimage goes into the whole menu, whereas bgimage is applied to each item. Because the 1st and last items are set as headers that bgimage will not show in them.

4. Now to the original problem. That is a result of the css margin code MARGIN: auto; The only fix I could find was to eliminate the MARGIN: auto; from the body tag and add align="center"; to the main surrounding table.
Code:
<BODY>
<SCRIPT src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT src="mmenudom.js" type=text/javascript></SCRIPT>
<SCRIPT src="menu_data.js" type=text/javascript></SCRIPT>
<TABLE cellSpacing=0 cellPadding=0 width=933 border=0 align="center">


Hope that helps. Sorry it was so long. By the way, I really like your site. Very, very nice!

Re: Little bug with menu and IE : still having the bug...


Poster: bpolackoff
Dated: Monday January 7 2008 - 3:00:32 GMT

Thanks!!!!! I will try those fixes now and will let you know how everything goes! Thanks again!

Re: Little bug with menu and IE : still having the bug...


Poster: Ruth
Dated: Monday January 7 2008 - 3:04:58 GMT

:oops: I forgot one thing. You also have to add top="offset=-2"; to all the submenus. For some reason with that align center and no margin in the css the submenus open farther down than they should. that -2 fixes them to be just like you have them. So, the subs would be, for example

Code:
with(milonic=new menuname("About")){
top="offset=-2";
margin=2;
rawcss="text-align:left";
style=BigTransparent;


Ruth

Re: Little bug with menu and IE : still having the bug...


Poster: bpolackoff
Dated: Monday January 7 2008 - 4:12:17 GMT

Thank you so much! I ultimatly, along with all the other changes you suggested, changed all pages to use the align=center for the surrounding table. Thank god for "global find and replace" :D

I do appreciate your very quick and very in depth response.

Thanks Again!
Brian

Re: Little bug with menu and IE : still having the bug...


Poster: Ruth
Dated: Monday January 7 2008 - 5:08:56 GMT

You're welcome. Don't forget that since that is a commercial site you will need to purchase a license. They are pretty inexpensive, the license is for eternity, if you want it that long :), and it includes 1 year of email support and free upgrades. It also allows you to use any sample you want or all of them or any combination of them.

If you need any more help, just post back here.

Ruth