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: Thursday February 8 2018 - 06:02:28

Problem with Menu Sample 9


Poster: Tyssen
Dated: Tuesday August 26 2003 - 4:23:17 BST

I downloaded a copy of the DHTML Menu sample number 9 Relative Positioning (Table Bound) which works fine when I view it on the Milonic website, but when I look at the menu.htm that I've downloaded, the dropdown menu for "Menu Samples" doesn't work (ie no menu items appear below it) and the same thing happens when I try to customise it for my own use. It doesn't matter how I order the menus or what their content, the first one always doesn't work.
I know it's nothing I've done because this is viewing the file, as downloaded, from the Milonic site, with all the relevant .js files in place.
Anyone know what the trouble might be?


Poster: Maz
Dated: Tuesday August 26 2003 - 6:08:36 BST

It looks like the top 2 js call lines need an </script> on each.


Poster: Tyssen
Dated: Tuesday August 26 2003 - 6:44:12 BST

I'm not sure we're looking at the same file. My menu.htm reads like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style>

BODY
{FONT-FAMILY:verdana;
background-color:#FFFFFF;
}

.backG {
FONT-FAMILY:verdana;
background-color:#93c39b;
color:#ffffff;
border-bottom:#538c4d 2px solid;
font-size:120%;
}

</style>


<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>


</head>

<body>



<table width=100% cellSpacing=0 cellPadding=13 border=0 style="border:1px solid #aaaaaa">
<tr>
<td class=backG align=center>
<b>Relative Positioning (Table Bound)</td>
</tr>

<tr>
<td class=form1>
<table border=1 width=100%>
<tr>
<td>
Left Aligned Table Cell
</td>
</tr>
<tr>
<td align=center style="font-size:125%">
Center Aligned Table containing the menu
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=My Milonic;");
}
drawMenus();

</script>
</td>
</tr>


Poster: Maz
Dated: Tuesday August 26 2003 - 7:23:11 BST

I was looking at this page
http://www.milonic.co.uk/menusample.php?sampleid=9

<SCRIPT language=JavaScript src="/milonic_src.js" type=text/javascript>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript>
missing the </script>

You don't have the slash /milonic_src.js

(I'm not sure about style.css on the same page, but normally in a style page they have to be in a certain order, color comes first.)

Is there an
</table>
</body>
</html>
or did you not show that here?

If the end is missing perhaps you should try another download.

I haven't worked with table bound so I may not have all the answers you are looking for.


Poster: Hergio
Dated: Tuesday August 26 2003 - 21:15:14 BST

I think this is a bug in the menu....but try copying the first menu declaration in the file and pasting it above itself, then rename it. Dont make any other menus show it (reference it) but just the fact that menu samples is no longer the first menu declared in code clears up the problem. Not sure why.

And maz, in the code on the sample page, the closing script tags are actually there (they are also in the download version) but they didnt render because when whomever created the page (not pointing fingers) they didn't escape the <SCRIPT> tag and the browser renders it. Take a look at the source for the page, they're there. When you want strings like "<SCRIPT>" and "</SCRIPT>" to show up in HTML, you need to escape the > and < symbols or break up the word 'script'.


Poster: Tyssen
Dated: Tuesday August 26 2003 - 23:07:00 BST

Hergio wrote:I think this is a bug in the menu....but try copying the first menu declaration in the file and pasting it above itself, then rename it. Dont make any other menus show it (reference it) but just the fact that menu samples is no longer the first menu declared in code clears up the problem. Not sure why.


Yeah, that did it. I'd actually come up with a similar (but far more clumsy) work around in the meantime - now I've tidied up. :D

Bug in menu sample 9


Poster: stephen702
Dated: Wednesday August 27 2003 - 0:15:40 BST

Here's another oddity:

The online sample of #9 works fine with Netscape 4.7 on the PC. But none of the drop-menus work in the downloaded version when using 4.7.


Poster: Maz
Dated: Wednesday August 27 2003 - 0:28:33 BST

I remember now there was another post about this menu, so its not fixed yet, might be worth your while to search for the post.
Sorry I can't help here.
maz :|


Poster: Hergio
Dated: Wednesday August 27 2003 - 3:43:44 BST

John G. posted a good fix to the problem here http://www.milonic.com/forum/viewtopic.php?t=2352#8057. Basically it intails putting the all the menu code back into menu_data and then referencing the <SCRIPT src="..."></SCRIPT> inside the td you want the menu to appear in. Check it out.


Poster: Russell Conder
Dated: Thursday August 28 2003 - 1:44:47 BST

[quote="Hergio"]I think this is a bug in the menu....but try copying the first menu declaration in the file and pasting it above itself, then rename it.
...
like this:
with(milonic=new menuname("workaround")){
style=menuStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
}
with(milonic=new menuname("Details")){
style=menuStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
..
and it works, for anyone else looking for the answer.