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:03
Interesting IE problem
Poster: hbrand
Dated: Saturday October 18 2003 - 4:11:00 BST
I've got the menu working real well and doing most of what I want at:
http://www.roberthildebrand.com/websites/see/index.html
except that I wanted to pop it in a table cell so that it will float centered with the table. Seems easy...I did it just fine and it works perfectly in Scape 7.x for MacOS X and Safari 1.0, but the submenus are really offset down and to the right in IE 5.2.2 for MacOS X. You can see it here:
http://www.roberthildebrand.com/website ... xtest.html
Be aware that indextest uses jscripts in subdirectory [menus2]
Likely it's something really dumb that I overlooked, but it could be a bug!!
Best,
Robert
http://www.roberthildebrand.com
finest in landscape photography
Poster: Maz
Dated: Saturday October 18 2003 - 14:35:51 BST
I checked, by going to another page, it sits correct, but just that one the submenus are offset, looking at the source, there doesn't appear to be any difference between the pages, are there?
I suggest moving the script tags from header to just below body.
On your test page, remove the div, take the source code out of table and put it under body, then only place menu-data in the table without div.
Let us know if it makes any difference.
Thank you
maz
fixed it!
Poster: hbrand
Dated: Saturday October 18 2003 - 21:01:25 BST
Actually, the fix was a matter of putting the initial menu itself in the table cell and moving the jscript calls back into the header. Now it acts like a grown up!! I won't bother to upload the corrected test version, but I've included a snippet below if others need to see it. The corrected version will be up at http://www.roberthildebrand.com/websites/see/ later today.
Best,
Robert
http://www.roberthildebrand.com
the best in landscape photography
<head>
<style type="text/css" media="screen">
<!--
__at__ import "main.css";
-->
</style>
<link rel="stylesheet" href="scape4.css" type="text/css">
<SCRIPT language=JavaScript src="menu2/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=menu2/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=menu2/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu2/menu_data.js" type=text/javascript></SCRIPT>
</head>
<body bgcolor="#000000">
<div align="center">
<table width="780" cellspacing="0" cellpadding="0" class="whitetable"><tr><td colspan="3">
<img src="images/page1a.gif" border="0" usemap="#head"><img src="images/page1b.jpg"><br>
<script>with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative"
aI("image=images/page2a_new.gif;");
aI("image=overview_off.gif;overimage=overview_on.gif;showmenu=overview;");
aI("image=subjects_off.gif;overimage=subjects_on.gif;showmenu=subjects;");
aI("image=news_off.gif;overimage=news_on.gif;showmenu=news;");
aI("image=people_off.gif;overimage=people_on.gif;showmenu=people;");
aI("image=jobs_off.gif;overimage=jobs_on.gif;showmenu=jobs;");
aI("image=apply_off.gif;overimage=apply_on.gif;url=apply.html;");
aI("image=major_off.gif;overimage=major_on.gif;url=majoring.html;");
aI("image=links_off.gif;overimage=links_on.gif;showmenu=links;");
aI("image=images/page2c_new.jpg;");
}
drawMenus();
</script><img src="images/page_3a.gif">
Poster: John
Dated: Saturday October 18 2003 - 21:30:04 BST
Actually, what I think Maz was after, and I mis-read because it was another 19+ hour day, was the following...
1. JS calls to the menu code go as the first items after <body>...
Code:
<SCRIPT language=JavaScript src="menu2/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=menu2/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=menu2/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu2/menu_data.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=menu2/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=menu2/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu2/menu_data.js" type=text/javascript></SCRIPT>
OR, if table-bound, move the _data.js call to the <td> by itself.
2. The "Main Menu" code remains in the _data.js file, not in the HTML.
Some of us have been finding this works better than the example.
However - point is you got it working. Welcome to the Milonic family
why I did it the way I did...
Poster: hbrand
Dated: Saturday October 18 2003 - 22:12:55 BST
Yes, I can see those solutions, but I wanted to include two different ends to the menu. You'll notice that the entire initial menu comprises images with rollovers (if you do this you might want to preload the overimages especially if you have many or large images elsewhere on the page). The interior pages have a different right end. Of course, I could have simply had two different styles in the data file, but I decided it was even easier to just change the end images. That's why I dumped the style right into the menu spot.
You can view the finished centered and embedded menu at:
http://www.roberthildebrand.com/websites/see/
Best,
Robert
http://www.roberthildebrand.com[/code]