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

Inserting a menu into a Table


Poster: kelthore
Dated: Friday March 10 2006 - 6:57:21 GMT

My problem is that when i load my page on IE6 i my menu automatically shows in the upper left hand corner. I have placed it in a table but still dont understand why its not working.

You can see the problem if you go here http://www.imaswitcher.com/index3.php this site can only be accessed from the url though and only for the sole intention of testing before going live which is the only reason a link to milionic is not up yet. But it will be before i make this my main page.

HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Welcome to the Switchers Guild Webpage!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="383F44" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><img src="images/images/images2_01.gif" width="740" height="110"></td>
</tr>
<tr>
<td width="111" background="images/images/images2_02.gif">&nbsp;</td>
<td width="550" valign="top" background="images/images/images2_03.gif">
<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>
<div align="center"><script type="text/javascript" src="javamenu/milonic_src.js"></script>
<div class=milonic><a href="http://www.milonic.com/">JavaScript Menu, DHTML Menu
Powered By Milonic</a></div>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=javamenu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=javamenu/mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="javamenu/menu_data.js"></script></div></td>
<td width="79" background="images/images/images2_04.gif">&nbsp;</td>
</tr>
</table>


Poster: Migru
Dated: Friday March 10 2006 - 7:25:58 GMT

Hi

the way you have placed the menu in the table is not correct.

You have to take this out of the table and place it right after the <body>
Code:
<script type="text/javascript" src="javamenu/milonic_src.js"></script>
<div class=milonic><a href="http://www.milonic.com/">JavaScript Menu, DHTML Menu
Powered By Milonic</a></div>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=javamenu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=javamenu/mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="javamenu/menu_data.js"></script>


It is then that you have to edit the

Code:
menu_data.js


Open the file with an editor and copy the main menu. Delete (cut) the main menu out of the file and save the file without the main menu. Then delete everything except for drawMenus() and paste the main menu in and save the file as "embedded_main.js". But please, this file need to have this own drawMenus() at the end.

In the <TD> cell, where you had all the menu code before there you just include

Code:
<script type="text/javascript" src="embedded_main.js"></script>


(eventually with your path/folder modified)

The main menu should not have
top=... ; and left=... :set, but
position="relative";
alwaysvisible=1;
style=.....;
aI("...."; ) ; etc
drawMenus();

A detailed instruction you find here:

http://www.milonic.com/tablemenu.php



This should help

Michael


Poster: Migru
Dated: Friday March 10 2006 - 12:38:26 GMT

Hi



Quote:
my menu automatically shows in the upper left hand corner


you could have replaced the "left" property of the main menu, by

screenposition="center"; instead of placing it in a table.

Please see
http://www.milonic.com/menuproperties.php
http://www.milonic.com/itemproperties.php
http://www.milonic.com/styleproperties.php


Michael