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

Please test on I.E. 5.2.3 on a MAC


Poster: -fiscus-
Dated: Tuesday July 13 2004 - 13:22:37 BST

Guys....I am having problems with a client reporting problems with the menu on her I.E. 5.2.3 on a Powerbook.

I was running 5.18 and got her to test it on Safaria and it was working fine...so it was only an issue on I.E. 5.2.3 (everything looks find on my PC I.e 6).

Can you please just have a look at http://screenwise.com.au/ and first tell me if the menu displays on inital load...she is reporting that she needs to click on the 'screenwise' breadcrumb link after the page has loaded to get the menu to display.

Secondly, if you however on tutors can you please tell me if the offset is working...she is reporting that it is displaying to far down the page and that is getting cut off....the start of the tutors menu is display at application form (for example).

I have just upgraded to the latest version 5.33 and am waiting to hear a reply from her but I thought i would get you guys to test as well if possible.

Please report any issues.


Poster: John
Dated: Tuesday July 13 2004 - 15:04:36 BST

Maz should be able to help you when she gets on. I don't have a Mac at the office :cry: to look at it.


Poster: Ruth
Dated: Tuesday July 13 2004 - 15:53:24 BST

I don't have a mac, however there are a couple of things to note. You have placed the complete menu data in a div and then placed the div in a table. Unless there have been changes it should not be in a div, and check here about placing it in the table especially with reference to the IMPORTANT notes, and the note about mac trouble which references IE. Also, you have followscroll=1, but it's in a table cell so it isn't going to scroll as far as I know, it's fixed there.

Ruth


Poster: Ruth
Dated: Tuesday July 13 2004 - 16:04:26 BST

Hi again. I spent a little more time looking at the menu and page. I'm not sure why you have the menu in a table, if it's not necessary it would be better to remove it and just call the file. If you put the data back in the menu_data.js file and code the main menu to top=145; and left=10; remove the position="relative"; then the menu would sit right where it is now, it would follow scroll and you'd avoid the problems with tables. I'd put a spacer image in that table cell the width you have the cell listed so it is always that 126 wide :)

Ruth


Poster: fiscus
Dated: Wednesday July 14 2004 - 8:32:17 BST

Thanks for looking into this further Ruth....I'm, not sure if you cantell from the code but i am using a php file rather than the JS file for the config data.....the reason for this is that the menu is dynamically driven from a mysql DB (using Phsae CMS).

Basically it uses things called snippets which are effectively just a php file that can be called on. So basically i have a template and in the side table i have [[milonicmenu]] that calls the snippet.

I have recently change my site from a scrolling menu to a fixed one so that is probably why there is still the follow scroll in there. I can remove that.

This is the current code that is driving my menu:

Code:
$MilonicMenu = "
<script>
_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=100            // The time delay before menus open on mouse over
_subOffsetTop=5
_subOffsetLeft=1

with(ScrollingSampStyle=new mm_style()){
onbgcolor=\"#E78B00\";
oncolor=\"#6b6b74\";
offbgcolor=\"#e4e7eb\";
offcolor=\"#6b6b74\";
bordercolor=\"#e4e7eb\";
borderstyle=\"solid\";
borderwidth=1;
separatorcolor=\"#73726D\";
separatorsize=\"1\";
padding=5;
fontsize=\"11\";
fontstyle=\"normal\";
fontfamily=\"verdana\";
pagecolor=\"#F6F3F1\";
pagebgcolor=\"#A6A5AC\";
headercolor=\"#666666\";
headerbgcolor=\"#F6F3F1\";
overfilter=\"Fade(duration=0.2);Alpha(opacity=90);\";
outfilter=\"randomdissolve(duration=0.2)\";
}
with(milonic=new menuname(\"Main Menu\")){ 
style=ScrollingSampStyle;
position=\"relative\";
left=0;
itemwidth=120;
alwaysvisible=1; ";


// OK, first we set the main menu up, by getting the documents in the root of the document tree.
$sql = "SELECT id, pagetitle, isfolder FROM $dbase.".$table_prefix."site_content WHERE $dbase.".$table_prefix."site_content.parent=0 AND $dbase.".$table_prefix."site_content.published=1 AND $dbase.".$table_prefix."site_content.deleted=0 ORDER BY $dbase.".$table_prefix."site_content.menuindex DESC;";
$rs = $db->Execute($sql);
$limit = $rs->RecordCount();
$menu1src=$rs->GetRows($limit);


for ($y = 0; $y < $limit; $y++) {
   if($menu1src[$y]['isfolder']==1) {
      $MilonicMenu.="aI(\"text=".$menu1src[$y]['pagetitle'].";showmenu=".$menu1src[$y]['pagetitle']."\");\n";
   } else {
      $MilonicMenu.="aI(\"text=".$menu1src[$y]['pagetitle'].";url=index.php?id=".$menu1src[$y]['id'].";status=".$menu1src[$y]['pagetitle']."\");\n";
   }       
}

$MilonicMenu.="
}
";

// now we loop throught he results again to get those document's children
for ($y = 0; $y < $limit; $y++) {
   $sql = "SELECT id, pagetitle FROM $dbase.".$table_prefix."site_content WHERE $dbase.".$table_prefix."site_content.parent=".$menu1src[$y]['id']." AND $dbase.".$table_prefix."site_content.published=1 AND $dbase.".$table_prefix."site_content.deleted=0 ORDER BY $dbase.".$table_prefix."site_content.menuindex DESC;";
   $rs2 = $db->Execute($sql);
   $limit2 = $rs2->RecordCount();
   if($limit2>0) {
      $MilonicMenu .= "with(milonic=new menuname(\"".$menu1src[$y]['pagetitle']."\")){
      style=ScrollingSampStyle;
      overflow=\"scroll\";";
      for ($x = 0; $x < $limit2; $x++) {
         $menu2src=$rs2->FetchRow();
         $MilonicMenu.="aI(\"text=".$menu2src['pagetitle'].";url=index.php?id=".$menu2src['id'].";status=".$menu2src['pagetitle']."\");\n";   
      }
      $MilonicMenu.="
      }
      ";
   }
}

$MilonicMenu.="

drawMenus();

</script>
";


I know all the stuff there wont make alot of sense but you can clearly see the milonic config stuff at the top.

I will check that link you gave me and the stuff for the MAC.

Anything else you can offer after looking at the code is appreciated.

Many Thanks.


Poster: Ruth
Dated: Wednesday July 14 2004 - 15:31:44 BST

Looking at your design you have a centered table so you'd need the menu in the cell to move with the table. You're right as to the php, I couldn't 'write' it but I do comprehend what it's doing. So, what you seem to have done is have a 'snippet' that puts the whole menu in the cell, but what you need to do is have two snippets, one to put the main menu into the cell- this part
Code:
with(milonic=new menuname("Main Menu")){ 
style=ScrollingSampStyle;
position="relative";
left=0;
itemwidth=120;
alwaysvisible=1; aI("text=Home;url=p1.html;status=Home");
aI("text=About Us;url=p7.html;status=About Us");
aI("text=Courses & Classes;showmenu=Courses & Classes");
aI("text=Tutors;showmenu=Tutors");
aI("text=Industry Heartbeat;url=p52.html;status=Industry Heartbeat");
aI("text=Studio Facilities;url=p9.html;status=Studio Facilities");
aI("text=Showreels;url=p10.html;status=Showreels");
aI("text=Testimonials;url=p51.html;status=Testimonials");
aI("text=Application Form;url=p105.html;status=Application Form");
aI("text=Search;url=p49.html;status=Search");
aI("text=Contact Us;url=p25.html;status=Contact Us");
aI("text=Links;showmenu=Links");

} drawMenus();

Note there is a drawmenus with it. All the above would go between script tags. Then another snippet would call all the menu files including the menu_data.php file which would have all the other stuff left in it, the style, submenus, etc and also a drawmenus is still in that file.
Code:
<SCRIPT language=JavaScript src="site/menu/milonic_src.js" type=text/javascript></SCRIPT>
<script   language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenudom.js><\/scr"+"ipt>");
</script><SCRIPT language=JavaScript src="site/menu/menu_data.php" type=text/javascript></SCRIPT>
These calls need to be immediately after the body tag as per the directions for the mac problem.

Now, having already said I have no understanding of writing php maybe I'm out on Mars or something. :lol:

Ruth


Poster: Maz
Dated: Wednesday July 14 2004 - 16:13:57 BST

Hi,

Looking good in Safari, you don't want to know about ie :roll: the submenu is 2 menu items down and 25px to the right.

maz


Poster: -fiscus-
Dated: Thursday July 15 2004 - 0:22:49 BST

Yeah that is the problem she is having....the submenu's launch too far down the screen.

Hmmm this is annoying.

Does the menu appear when the page first loads for you....atleast I can get rid of one problem.

I need to look into this further.


Poster: Ruth
Dated: Thursday July 15 2004 - 0:45:55 BST

You might try building the submenus first before the main menu is rendered as the faqs on the ie for maq trouble states has to be done in order for them to be positioned correctly when they open. It states specifically they cannot be built in the table cell with the main menu.

Ruth


Poster: -fiscus-
Dated: Thursday July 15 2004 - 0:48:25 BST

Ok i have looked at those link thats were posted.

I have removed the <div>'s and but the submenu stuff up under the body tag, ie:.

Code:
<SCRIPT language=JavaScript src="site/menu/milonic_src.js" type=text/javascript></SCRIPT>
<script   language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenudom.js><\/scr"+"ipt>");
</script>


I have removed the old non-existant scrolling code (from the old menu).

Maz/Ruth please test if you get a chance.

Thanks.


Poster: -fiscus-
Dated: Thursday July 15 2004 - 1:23:38 BST

Ruth wrote:
You might try building the submenus first before the main menu is rendered as the faqs on the ie for maq trouble states has to be done in order for them to be positioned correctly when they open. It states specifically they cannot be built in the table cell with the main menu.

Ruth


Ruth...please see my above post..from what I gathered on that mac trouble page this was all I had to do? Move the <script> .... </script> code to up and under the <body> tag....is this the code that it is referring to that builds the subs?


Poster: Maz
Dated: Thursday July 15 2004 - 1:25:31 BST

I used the link at the top, submenu offset still the same in mac ie, it loads okay though.

maz


Poster: fiscus
Dated: Thursday July 15 2004 - 1:43:11 BST

Maz....to get this working for MAC I.E. all I could get out of the help page was the redraw the submenu's independant....and from that I aussume I put the

Code:
<SCRIPT language=JavaScript src="site/menu/milonic_src.js" type=text/javascript></SCRIPT>
<script   language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenuns4.js><\/scr"+"ipt>");       
else _d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenudom.js><\/scr"+"ipt>");
</script>


Right below the <body> tag? Or am i mistaken.

Any other ideas?


Poster: Ruth
Dated: Thursday July 15 2004 - 2:55:37 BST

Hi fiscus,
Based on your page this is what it should look like after it's 'finished' meaning the php writing the various things to the page..I'll start with the body tag.
Code:
<BODY>
<SCRIPT language=JavaScript src="milonic_src.js"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt language=JavaScript src=site/menu/mmenudom.js><\/scr"+"ipt>");
</SCRIPT>
<SCRIPT>
_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=100            // The time delay before menus open on mouse over
_subOffsetTop=5
_subOffsetLeft=1

with(menuStyle=new mm_style()){
onbgcolor="#E78B00";
oncolor="#6b6b74";
offbgcolor="#e4e7eb";
offcolor="#6b6b74";
bordercolor="#e4e7eb";
borderstyle="solid";
borderwidth=1;
separatorcolor="#73726D";
separatorsize="1";
padding=5;
fontsize="11";
fontstyle="normal";
fontfamily="verdana";
pagecolor="#F6F3F1";
pagebgcolor="#A6A5AC";
headercolor="#666666";
headerbgcolor="#F6F3F1";
overfilter="Fade(duration=0.2);Alpha(opacity=90);";
outfilter="randomdissolve(duration=0.2)";
}

with(milonic=new menuname("Courses & Classes")){
      style=menuStyle;
      overflow="scroll";aI("text=Current Classes;url=p42.html;status=Current Classes");
aI("text=Screenteens News;url=p54.html;status=Screenteens News");
aI("text=Workshop News;url=p55.html;status=Workshop News");

      }
      with(milonic=new menuname("Tutors")){
      style=menuStyle;
      overflow="scroll";aI("text=Denise Roberts;url=p21.html;status=Denise Roberts");
aI("text=Victoria Longley;url=p23.html;status=Victoria Longley");
aI("text=Tina Bursill;url=p27.html;status=Tina Bursill");
aI("text=Simon Burke;url=p28.html;status=Simon Burke");
aI("text=Lucy Bell;url=p29.html;status=Lucy Bell");
aI("text=Andrew McFarlane;url=p30.html;status=Andrew McFarlane");
aI("text=Nico Lathouris;url=p31.html;status=Nico Lathouris");
aI("text=Scott Hartford-Davis;url=p32.html;status=Scott Hartford-Davis");
aI("text=Stephen Wallace;url=p33.html;status=Stephen Wallace");
aI("text=Phillip Holder;url=p34.html;status=Phillip Holder");
aI("text=Tamblyn Lord;url=p35.html;status=Tamblyn Lord");
aI("text=Patrick Dickson;url=p36.html;status=Patrick Dickson");
aI("text=Roxane Wilson;url=p37.html;status=Roxane Wilson");
aI("text=Grant Bowler;url=p39.html;status=Grant Bowler");
aI("text=William Zappa;url=p40.html;status=William Zappa");
aI("text=Future Tutors;url=p41.html;status=Future Tutors");

      }
      with(milonic=new menuname("Links")){
      style=menuStyle;
      overflow="scroll";aI("text=studioCRE8;url=p44.html;status=studioCRE8");
aI("text=artConnect;url=p46.html;status=artConnect");
aI("text=Quiet on the Set;url=p47.html;status=Quiet on the Set");
aI("text=Australian Centre Of Performing Arts;url=p111.html;status=Australian Centre Of Performing Arts");
      }

drawMenus();
</SCRIPT>

<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0><!--DWLayoutTable-->
  <TBODY>
  <TR>
    <TD vAlign=top colSpan=3 height=120>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><!--DWLayoutTable-->
        <TBODY>
        <TR>
          <TD vAlign=top width=750 bgColor=#e6e7e2 height=100>
            <DIV align=left>
            <OBJECT title=screenwise
            codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0
            classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=750
            height=100><PARAM NAME="movie" VALUE="site/header.swf"><PARAM NAME="quality" VALUE="high">
                                                            <embed
            src="site/header.swf" quality="high"
            pluginspage="http://www.macromedia.com/go/getflashplayer"
            type="application/x-shockwave-flash" width="750"
            height="100"></embed>              </OBJECT></DIV></TD></TR>
        <TR>
          <TD class=topspacer vAlign=top height=20><A
            href="http://screenwise.com.au/">Screenwise</A> ::
        <B>Home</B></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD vAlign=top width=126 rowSpan=2>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#e4e7eb border=0><!--DWLayoutTable-->
        <TBODY>
        <TR>
          <TD class=menu vAlign=top width=126 height=300>
            <SCRIPT> with(milonic=new menuname("Main Menu")){
position="relative";
style=menuStyle;
alwaysvisible=1;
left=0;
itemwidth=120; aI("text=Home;url=p1.html;status=Home");
aI("text=About Us;url=p7.html;status=About Us");
aI("text=Courses & Classes;showmenu=Courses & Classes");
aI("text=Tutors;showmenu=Tutors");
aI("text=Industry Heartbeat;url=p52.html;status=Industry Heartbeat");
aI("text=Studio Facilities;url=p9.html;status=Studio Facilities");
aI("text=Showreels;url=p10.html;status=Showreels");
aI("text=Testimonials;url=p51.html;status=Testimonials");
aI("text=Application Form;url=p105.html;status=Application Form");
aI("text=Search;url=p49.html;status=Search");
aI("text=Contact Us;url=p25.html;status=Contact Us");
aI("text=Links;showmenu=Links");

} drawMenus(); </script> </TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top width=544 height=200>  and so on with the rest of the stuff on the page.


So you see, the main menu is in the table cell but all the rest of the menus and stuff are after the body tag and before any div or anything so they get 'built' before the main menu gets rendered.

What I was trying to say before is I thought you could just have the php codes or commands 'call' the menu_data.php file [without the main menu in it] itself instead of writing out all the submenus and such on the page, but I don't know.

I hope that helps with a visual. I know this must be frustrating since I can't explain in the php terms about the menu.

Ruth


Poster: fiscus
Dated: Thursday July 15 2004 - 9:52:52 BST

Ruth thanks again. Atleast I know what I have to look for know.

Do you know any board/team members that are PHP guru's? I tried asking around on IRC for some help but I think I need someone that knows both php AND milonic.

If there is let me know and I will try and contact/PM them.


Poster: Ruth
Dated: Thursday July 15 2004 - 10:48:15 BST

You might try this topics, I don't know php so am not sure they will help you.
http://www.milonic.com/forum/viewtopic.php?t=3228
http://www.milonic.com/forum/viewtopic.php?p=19081
http://www.milonic.com/forum/viewtopic.php?p=18361

http://www.milonic.com/forum/viewtopic.php?p=13885#13905 On this last one you want to go down to just after the quotes posted in this post and Kevin has an explanation for the 'general audience' about php.

You can also post a new topic with a title like 'Using php to put menu in a table' or something like that. Right now the title focuses on Mac and IE so you might not get too many php people. I'm sure there are php users and with php in the title you might get more focused responses.

You have a professional license for the menu don't you? If so you might also try contacting milonic support. Hope all of this helps

Ruth


Poster: fiscus
Dated: Thursday July 15 2004 - 12:09:41 BST

Ok I think it is safe to say that we now know what the problem is...I just need to find out a solution!!!

I have started a new thread in a hope to get some help with the php scripting side of things.

New PHP orientated thread is here


Poster: fiscus
Dated: Sunday July 18 2004 - 11:13:30 BST

Maz....sorry to bother you again but after a couple of days of trial and error I think I have matched my code to yours.

It was a bit more complicated cause my menu is entirely DB driven.

Anyway - can you please check out this page: http://www.screenwise.com.au/

Please test on a MAC and see if the issue with the subs has been resolved cause now they are being created and drawn after the body tag and then the main menu is in the table.


Poster: Maz
Dated: Sunday July 18 2004 - 20:07:35 BST

Perfect both Safari and ie, right on target, well done.


maz :D


Poster: fiscus
Dated: Sunday July 18 2004 - 22:49:28 BST

YEEESSS!!!!!

Thanks again guys for pointing me in the right direction!