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

Submenus don't show up in tables


Poster: thundeerbirdie
Dated: Friday December 22 2006 - 18:04:39 GMT

Hi All,

I hope some one can help me with this. I have place the menu code within a table (see below) and the menu placement is good however I get no submenus. The submenus do work when I place the menu system out side of a table when its floating in th upper left side.

Can anyone help me with this?

Thanks and Happy Holidays

Code:
<html xmlns="http://www.w3.org/1999/xhtml">
{strip}
<head>
{if $title != '' }
   <title>{$title} </title>
{elseif $config.site_title ne '' }
   <title>{$config.site_title|stripslashes}</title>
{else}
   <title>{lang mkey='title'}</title>
{/if}

<script type="text/javascript">
/* <![CDATA[ */
var loadingTag = "{lang mkey='loading'}";
var modeRewrite = "{$config.enable_mod_rewrite}";
var docRoot = "{$smarty.const.DOC_ROOT}";

{if $config.use_popups == 'N'}
var use_popups = false;
{else}
var use_popups = true;
{/if}
{if $config.use_profilepopups == 'N'}
var use_profilepopups = false;
{else}
var use_profilepopups = true;
{/if}
/* ]]> */
</script>

<link href="{$css_path}default.css" rel="stylesheet" type="text/css" />
{include file="xhtml.css.tpl"}
<script type="text/javascript" src="javascript/functions.js"></script>
<script type="text/javascript" src="javascript/check.js"></script>
<script type="text/javascript" src="javascript/validate.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
function newvalidateLogin(newform)
{ldelim}
   if (newform.txtusername.value == '') {ldelim}
      alert("{lang mkey='signup_js_errors' skey='username_noblank'}");
      return false;
   {rdelim}
   if (newform.txtpassword.value == '') {ldelim}
      alert("{lang mkey='signup_js_errors' skey='password_noblank'}");
      return false;
   {rdelim}
{rdelim}
/* ]]> */
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="keywords" content="{$config.meta_keywords}" />
<meta http-equiv="description" content="{$config.meta_description}" />
</head>
<body bgcolor="#000000" text="{$config.textcolor}" style="margin:0px;padding:0px;" dir="{lang mkey='DIRECTION'}">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF9935">
  <tr>
    <td colspan="2" bgcolor="#FF9935"><p align="left"><a href="index.php" class="main_title"><font color="#FFFFFF">{$config.site_name|stripslashes}</font></a></p>
        <p align="center"></p></td>
    <td width="16%" rowspan="3" valign="top" bgcolor="#FF9935"><div align="left">{lang mkey='weekcnt'} <br />
      {lang mkey='totalgents'}<br />
      {lang mkey='totalfemales'}<br />
      {lang mkey='totalcouples'}<br />
      {lang mkey='weeksnaps'}</div></td>
    <td width="2%" rowspan="3" valign="top" bgcolor="#FF9935"><div align="left">{$weekcnt}<br />
      {$gents}<br />
      {$females}<br />
      {$couples} <br />
      {$weeksnaps}</div></td>
    <td width="1%" bgcolor="#FF9935"> </td>
    <td width="19%" rowspan="3" bgcolor="#FF9935">{include file="searchprofile.tpl"}</td>
  </tr>
  <tr>
    <td width="19%" bgcolor="#FF9935"><div align="left">{if $smarty.session.UserId == ''}</div></td>
    <td width="43%" bgcolor="#FF9935"><div align="center"></div></td>
    <td bgcolor="#FF9935"> </td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#FF9935"><div align="center">
      <div align="left">
        <form name="frmLogin" method="post" action="midlogin.php" onsubmit="javascript: return newvalidateLogin(this);" >
          <table width="100%" cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" border="0">
            <tr>
              <td><b>{lang mkey='members_login'}</b><br />
                  <img src="{$image_dir}blue_box.gif" width="2" height="10" alt="" /> {lang mkey='signup_username'} 
                <input class="input" maxlength="25" name="txtusername" size="8" style='font-size:9pt;width:70px' />
                  
                {lang mkey='signup_password'} 
                                    <input class="input" type="password" name="txtpassword" size="8" style='font-size:9pt;width:70px' />
                 
                                    <input type="submit" value="{lang mkey='login_submit'}" class='formbutton' />
                  <a href='signup.php'>{lang mkey='register'}</a> </td>
            </tr>
          </table>
        </form>
        {else} <strong>{lang mkey='welcome'}, {$smarty.session.FullName|stripslashes}  ({$smarty.session.UserName})</strong> {/if} </div>
    </div>
        <div align="center"></div></td>
    <td bgcolor="#FF9935"> </td>
  </tr>
        </div>
    <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div><script type="text/javascript" src="milonic_src.js"></script>   
<script type="text/javascript" src="mmenudom.js"></script>
<!-- The next file contains your menu data, links and menu structure etc -->
<script type="text/javascript" src="menu_data.js"></script>   </td>
  </tr>
</table>

<p> </p>
<table class="main_outer_table" cellspacing="0" cellpadding="0" width="832" border="0" >
  <tr>
    <td width="100%"><table width="104%" border="0" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF">
      <tr>
        <!-- Leftside Menu   -->
        <td width="150" height="41" valign="top"> {include file="leftcolumn.tpl"} </td>
        <!-- Rendered page -->
        <td width="435" valign="top"> {$rendered_page} </td>
        <td width="174" valign="top">{include file="rightcolumn.tpl"} </td>
      </tr>
    </table>
        <!--  Footer   -->
        <table cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" width="779" border="0">
          <tr>
            <td width='100%' align='center' class="footer" height="25"> {if $smarty.session.UserId <= 0} <a href='index.php?page=login' class='footerlink'>{lang mkey='site_links' skey='login'}</a> | 
              {/if}
              {if $config.enable_mod_rewrite == 'Y'} <a href='privacy.html' class='footerlink'>{lang mkey='site_links' skey='privacy'}</a> |  <a href='terms_of_use.html' class='footerlink'>{lang mkey='site_links' skey='terms_of_use'}</a> |  <a href='services.html' class='footerlink'>{lang mkey='site_links' skey='services'}</a> |  <a href='faq.html' class='footerlink'>{lang mkey='site_links' skey='faq'}</a> |  <a href='articles.html' class='footerlink'>{lang mkey='site_links' skey='articles'}</a> | 
              {else} <a href='index.php?page=privacy' class='footerlink'>{lang mkey='site_links' skey='privacy'}</a> |  <a href='index.php?page=terms_of_use' class='footerlink'>{lang mkey='site_links' skey='terms_of_use'}</a> |  <a href='index.php?page=services' class='footerlink'>{lang mkey='site_links' skey='services'}</a> |  <a href='index.php?page=faq' class='footerlink'>{lang mkey='site_links' skey='faq'}</a> |  <a href='index.php?page=articles' class='footerlink'>{lang mkey='site_links' skey='articles'}</a> | 
              {/if} <a href='affindex.php' class='footerlink'>{lang mkey='site_links' skey='affliates'}</a> |  <a href='javascript:launchTellFriend();' class='footerlink'>{lang mkey='site_links' skey='invite_a_friend'}</a> {* Feedback link depending on the option in global site settings *}
              {if ( $config.feedback_info == 'Y' && $smarty.session.UserId != '') or $config.feedback_info == 'N'}
               |  <a href='feedback.php' class='footerlink'>{lang mkey='site_links' skey='feedback'}</a> {/if} </td>
          </tr>
          <tr>
            <td width='100%' align='center' height="3"></td>
          </tr>
          <tr>
            <td width='100%' align='center'><a href="http://www.tufat.com/osdate.php" class='copyright' target="_blank">{$config.copyright}</a> </td>
          </tr>
          <tr>
            <td width='100%' align='center' height="3"></td>
          </tr>
      </table></td>
  </tr>
</table>

</body>
</html>
{/strip}


Poster: John
Dated: Saturday December 23 2006 - 3:42:54 GMT

While the posted code is interesting, a URL would e more help. Exactly what version of the menu are you running?

Basically, your code within the td is incorrect.


Poster: thundeerbirdie
Dated: Saturday December 23 2006 - 4:32:30 GMT

I am running the lastest version. Its actually the trial with the "Milonic" limk in the menu.

Can you tell me what what is wrong with the code in the td section?

Thanks


Poster: Ruth
Dated: Saturday December 23 2006 - 7:25:28 GMT

Hi,

There's a link below my name for tablemenu placement. It can't just have the files called there, unless you are using the buildAfterLoad=true which you can find on this page. Hmm, can't find my reference. OK, well this would go at the top of the data file the last thing in section where you see the subOffsetTop= and other parameters. Then you can call the files in the table cell. However, I have seen in some cases where the design layout was such as to still cause problems and the menu needed to be placed in the table with the old method.

In the information at the link below my name it tells you all else you need to do, i.e. using position='relative'; in the main menu up where you have the alwaysvisible=1;

Let us know if this doesn't resolve the issue.

Ruth


Poster: thundeerbirdie
Dated: Monday December 25 2006 - 16:14:36 GMT

Sorry, that doesn't help me out at all.

First of all, I don't have a alwaysvisible=1; anywhere in my site.

I have looked at the tablemenu placement and tried to follow it but it actually makes no sense to me.

any other closes?

I do love this script and if I can figure it out will buy it.

thanks


Poster: Ruth
Dated: Monday December 25 2006 - 18:58:29 GMT

Hello,

It would be much easier with an actual page to download and test. The code you posted keeps giving me an error alerts and I don't know what it is they want fixed since I don't do much coding.

Code:
Error: missing ( before condition
Source File: file:test.htm
Line: 18, Column: 4
Source Code:
{if $config.use_popups == 'N'}

Code:
Error: invalid return
Source File: test.htm
Line: 42, Column: 6
Source Code:
      return false;


So, can you put up a test page someplace. If not can you tell me based on what is on the page where you want the menu to be? Do you want it in the black area above or below the orange colored area?

Ruth


Poster: thundeerbirdie
Dated: Monday December 25 2006 - 19:07:04 GMT

Thanks for the reply. I have managed to get it closer to what I need it to do and where it needs to go.

I want the menu to be placed just below the orange table. In the code below I was able to make the menu go into the exact spot I need it to go and the submenus all work./ Now for the next problem. I still get the floating menu at the top of the page as well is in the table.

Any clue as to what went wrong?

Thanks and Happy Holidays


Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
{strip}
<head>
{if $title != '' }
   <title>{$title} </title>
{elseif $config.site_title ne '' }
   <title>{$config.site_title|stripslashes}</title>
{else}
   <title>{lang mkey='title'}</title>
{/if}

<script type="text/javascript">
/* <![CDATA[ */
var loadingTag = "{lang mkey='loading'}";
var modeRewrite = "{$config.enable_mod_rewrite}";
var docRoot = "{$smarty.const.DOC_ROOT}";

{if $config.use_popups == 'N'}
var use_popups = false;
{else}
var use_popups = true;
{/if}
{if $config.use_profilepopups == 'N'}
var use_profilepopups = false;
{else}
var use_profilepopups = true;
{/if}
/* ]]> */
</script>

<link href="{$css_path}default.css" rel="stylesheet" type="text/css" />
{include file="xhtml.css.tpl"}
<script type="text/javascript" src="javascript/functions.js"></script>
<script type="text/javascript" src="javascript/check.js"></script>
<script type="text/javascript" src="javascript/validate.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
function newvalidateLogin(newform)
{ldelim}
   if (newform.txtusername.value == '') {ldelim}
      alert("{lang mkey='signup_js_errors' skey='username_noblank'}");
      return false;
   {rdelim}
   if (newform.txtpassword.value == '') {ldelim}
      alert("{lang mkey='signup_js_errors' skey='password_noblank'}");
      return false;
   {rdelim}
{rdelim}
/* ]]> */
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="keywords" content="{$config.meta_keywords}" />
<meta http-equiv="description" content="{$config.meta_description}" />
</head>
<body bgcolor="#000000" text="{$config.textcolor}" style="margin:0px;padding:0px;" dir="{lang mkey='DIRECTION'}">
<noscript><a href="http://www.milonic.com/">JavaScript Menu Powered by Milonic</a></noscript>         
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<!-- The next file contains your menu data, links and menu structure etc -->
<script type="text/javascript" src="menu_data.js"></script>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF9935">
  <tr>
    <td colspan="2" bgcolor="#FF9935"><p align="left"><a href="index.php" class="main_title"><font color="#FFFFFF">{$config.site_name|stripslashes}</font></a></p>
        <p align="center"></p></td>
    <td width="16%" rowspan="3" valign="top" bgcolor="#FF9935"><div align="left">{lang mkey='weekcnt'} <br />
      {lang mkey='totalgents'}<br />
      {lang mkey='totalfemales'}<br />
      {lang mkey='totalcouples'}<br />
      {lang mkey='weeksnaps'}</div></td>
    <td width="2%" rowspan="3" valign="top" bgcolor="#FF9935"><div align="left">{$weekcnt}<br />
      {$gents}<br />
      {$females}<br />
      {$couples} <br />
      {$weeksnaps}</div></td>
    <td width="1%" bgcolor="#FF9935"> </td>
    <td width="19%" rowspan="3" bgcolor="#FF9935">{include file="searchprofile.tpl"}</td>
  </tr>
  <tr>
    <td width="19%" bgcolor="#FF9935"><div align="left">{if $smarty.session.UserId == ''}</div></td>
    <td width="43%" bgcolor="#FF9935"><div align="center"></div></td>
    <td bgcolor="#FF9935"> </td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#FF9935"><div align="center">
      <div align="left">
        <form name="frmLogin" method="post" action="midlogin.php" onsubmit="javascript: return newvalidateLogin(this);" >
          <table width="100%" cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" border="0">
            <tr>
              <td><b>{lang mkey='members_login'}</b><br />
                  <img src="{$image_dir}blue_box.gif" width="2" height="10" alt="" /> {lang mkey='signup_username'} 
                <input class="input" maxlength="25" name="txtusername" size="8" style='font-size:9pt;width:70px' />
                  
                {lang mkey='signup_password'} 
                                    <input class="input" type="password" name="txtpassword" size="8" style='font-size:9pt;width:70px' />
                 
                                    <input type="submit" value="{lang mkey='login_submit'}" class='formbutton' />
                  <a href='signup.php'>{lang mkey='register'}</a> </td>
            </tr>
          </table>
        </form>
        {else} <strong>{lang mkey='welcome'}, {$smarty.session.FullName|stripslashes}  ({$smarty.session.UserName})</strong> {/if} </div>
    </div>
        <div align="center"></div></td>
    <td bgcolor="#FF9935"> </td>
  </tr>
        </div>
    <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>
      <div align="center"></div>   </td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#00FFFF">
    <SCRIPT type="text/javascript" src="embedded_main_menu.js"></SCRIPT>
   </td>
  </tr>
</table>
<p> </p>
<table class="main_outer_table" cellspacing="0" cellpadding="0" width="832" border="0" >
  <tr>
    <td width="100%"><table width="104%" border="0" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF">
      <tr>
        <!-- Leftside Menu   -->
        <td width="150" height="41" valign="top"> {include file="leftcolumn.tpl"} </td>
        <!-- Rendered page -->
        <td width="435" valign="top"> {$rendered_page} </td>
        <td width="174" valign="top">{include file="rightcolumn.tpl"} </td>
      </tr>
    </table>
        <!--  Footer   -->
        <table cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" width="779" border="0">
          <tr>
            <td width='100%' align='center' class="footer" height="25"> {if $smarty.session.UserId <= 0} <a href='index.php?page=login' class='footerlink'>{lang mkey='site_links' skey='login'}</a> | 
              {/if}
              {if $config.enable_mod_rewrite == 'Y'} <a href='privacy.html' class='footerlink'>{lang mkey='site_links' skey='privacy'}</a> |  <a href='terms_of_use.html' class='footerlink'>{lang mkey='site_links' skey='terms_of_use'}</a> |  <a href='services.html' class='footerlink'>{lang mkey='site_links' skey='services'}</a> |  <a href='faq.html' class='footerlink'>{lang mkey='site_links' skey='faq'}</a> |  <a href='articles.html' class='footerlink'>{lang mkey='site_links' skey='articles'}</a> | 
              {else} <a href='index.php?page=privacy' class='footerlink'>{lang mkey='site_links' skey='privacy'}</a> |  <a href='index.php?page=terms_of_use' class='footerlink'>{lang mkey='site_links' skey='terms_of_use'}</a> |  <a href='index.php?page=services' class='footerlink'>{lang mkey='site_links' skey='services'}</a> |  <a href='index.php?page=faq' class='footerlink'>{lang mkey='site_links' skey='faq'}</a> |  <a href='index.php?page=articles' class='footerlink'>{lang mkey='site_links' skey='articles'}</a> | 
              {/if} <a href='affindex.php' class='footerlink'>{lang mkey='site_links' skey='affliates'}</a> |  <a href='javascript:launchTellFriend();' class='footerlink'>{lang mkey='site_links' skey='invite_a_friend'}</a> {* Feedback link depending on the option in global site settings *}
              {if ( $config.feedback_info == 'Y' && $smarty.session.UserId != '') or $config.feedback_info == 'N'}
               |  <a href='feedback.php' class='footerlink'>{lang mkey='site_links' skey='feedback'}</a> {/if} </td>
          </tr>
          <tr>
            <td width='100%' align='center' height="3"></td>
          </tr>
          <tr>
            <td width='100%' align='center'><a href="http://www.tufat.com/osdate.php" class='copyright' target="_blank">{$config.copyright}</a> </td>
          </tr>
          <tr>
            <td width='100%' align='center' height="3"></td>
          </tr>
      </table></td>
  </tr>
</table>

</body>
</html>
{/strip}


Poster: Ruth
Dated: Monday December 25 2006 - 22:49:05 GMT

Hi,

Most likely you left the main menu in the menu_data.js file.

Using the method you have the main menu should be in the embedded file with top and left removed and position='relative'; added, plus a drawMenus(); at the end. The menu_data.js file should have the main menu cut out of it, and it also has a drawMenus(); both the files have a drawMenus(); Many forget they need it in both files.

Ruth


Poster: thundeerbirdie
Dated: Tuesday December 26 2006 - 0:12:43 GMT

Yes I did forget to remove it. Everything works great now.

Thanks