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

Sample of Vertical menu in a table?


Poster: SkyFlyer
Dated: Tuesday March 1 2005 - 5:30:42 GMT

Greetings!
I have looked at so much stuff I am crosseyed!
I've tried following some threads, but most are specific problems that don't really help me, or stop short of giving me the answer.
I can find the horizontal and vertical menu samples.
I can find the menu in a table sample, but it is horizontal.
Is there a sample for a vertical menu in a table?
I put one together and it really stretches my page out.
It could be my .htm coding, but not sure at this point.
I'd like to find a sample and give it a few more tries before I put a link out for some assistance.
Am I correct in taking out the Main Menu code from the menu_data.js, and putting it in my table.htm code?
Any help or pointers to some samples or web sites, appreciated.
I'm sure the answer is in the forum, but there is a lot there!
I'll keep looking ...
Thanks ...


Poster: Ruth
Dated: Tuesday March 1 2005 - 11:06:10 GMT

Yes, you remove the main menu from the menu_data.js file. The following page layout shows how you put the menu in the table cell. Remember to NOT put the table into div tags. You can put the main menu into a .js file by itself and call it in the table cell if you prefer that. But, the coding for the menu calls including the menu_data.js file has to be the first thing after the body tag so all that gets 'built' before the main menu gets built [so it has the data already available when it shows on the page]. Note that the position="relative"; that has to be there. Hope that helps. You can also take the sample and // out the orientation="horizontal"; to test that one in the layout of that sample page.
Code:
<html>
<head>
   <title>Menu Table Test</title>
   
</head>

<body><script type="text/javascript" src="milonic_src.js"></script>   
<script   type="text/javascript">

if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");      
  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");

</script>
<script type="text/javascript" src="menu_data.js"></script>   
<table border="1" width="100%">
<tr>
       <td><script>with(milonic=new menuname("Main Menu")){
style=menuStyle;
position="relative";
alwaysvisible=1;
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu&nbsp;Samples;align=center;showmenu=Samples;title=All Samples");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My&nbsp;Milonic;showmenu=MyMilonic;");
aI("text=Back;url=javascript:history.go(-1);");
aI("text=Next;url=javascript:history.go(+1); ");
aI("text=just a test page;url=page1.htm;");

}
drawMenus();
</script></td>
       <td>aaaaaaaaaa</td>
       <td>You put the main menu into script tags in the table cell and include a drawmenus at the end. <br>You also have the draw menus in the menu_data.js file where you have the styles and the submenus.</td>
</tr>
</table><br><br>
<table border="1" width="100%">
<tr>
       <td>aaaaaaaaaaaaaaaaaaaa</td>
       <td width=250>s</td>
       <td>dddddddddddddddddddd</td>
</tr>
<tr>
       <td>This table is in a nested table which has been placed in center tags to keep it centered. The width of that cell is 250px to expand it and show the positioning of the menu using the positioning of the table in which it resides.--></td>
       <td><center><table border="1" bordercolor="#ff0000" align="center">
<tr>
    <td><script>with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
position="relative";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu&nbsp;Samples;align=center;showmenu=Samples;title=All Samples");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My&nbsp;Milonic;showmenu=MyMilonic;");
aI("text=Back;url=javascript:history.go(-1);");
aI("text=Next;url=javascript:history.go(+1); ");

}
drawMenus();
</script></td>
</tr>
</table></center></td>
       <td>g</td>
</tr>
<tr>
       <td>h</td>
       <td>j</td>
       <td>k</td>
</tr>
</table>

</body>
</html>


Ruth


Poster: SkyFlyer
Dated: Wednesday March 2 2005 - 6:20:37 GMT

Thanks, Ruth.
This is the kind of thing I was looking for.
I took your code and ran a sample test and it worked.
Then I applied your suggestions to my code.
Not exactly right, but I'm sure it is my .htm coding that is my problem.
Tables can be a pain ...
Are rowspan the same or different than div?
That might be my problem as they are part of my <td> in which my table is imbeded
I'll try if for a while. If I can't get it to go, I'll post it and let you have a looksee.
This info that you gave me, is it on Milonic in a sample somewhere?
Or is your's just easier to understand!!!
Thanks ...


Poster: Ruth
Dated: Wednesday March 2 2005 - 7:00:10 GMT

You're welcome. It's mine :). Can you post your html code here, noting the cell you want to hold the menu, and a description of what you want so we can check it out and see what's up?
Ruth


Poster: SkyFlyer
Dated: Wednesday March 2 2005 - 7:11:13 GMT

Thanks.
I really appreciate your help.
Some days I really feel STUPID!
I'm making progress, but will hit the sack for now. Long day!
I'll pick it up tomorrow and let you know how things go.
I'd like to figure it out.
Like I said, it is just .htm code. The menu part appears to be working somewhat now.
I have a little more aligning to do, but will make it.
Do you know of a good 'debugger' for .htm? Something that would help identify or clean up your code. I have been using Dreamweaver, but it really doesn't help you solve your problems. I should look at the Internet for something.
Anyway, thanks.
Until tomorrow ...


Poster: SkyFlyer
Dated: Wednesday March 2 2005 - 7:23:48 GMT

I got it Ruth! :D
Thanks for your help.
I'll post my sample tomorrow or so, in case anyone wants to look at it.
My problems were mostly .htm code.
I did have several other problems with Milonic code, but after loading up your sample and following it through, I got it worked out.
I want to put the mainmenu code in the .js library (instead of in the .ht code). That will be the task for tomorrow.