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

slight problem after update to version 5.735


Poster: wkilc
Dated: Tuesday November 22 2005 - 1:14:21 GMT

Hi all,

A while back, Andy helped me tweak a electronic form that used the menu to dynamically generate "pseudo" pull-down menus in some blank text fields.

Has always worked fine... but when I update from 5.727 to the latest 5.735... the "pseudo" menu no longer works.

Scroll down and click (or tab) into any field under, let's say, "Instrument",:

Version 5.727:
http://rimea.org/forms/allstate/test1.html


Version 5.735:
http://rimea.org/forms/allstate/test2.html

A clue... IE says "mm_style is undefined" as the JS error. Menu still works fine with my main site menu, though... so it's gotta be something with the "pseudo" pull-down data file.

I will paste the "pseudo" menu data here:
Code:
[size=9][color=darkred]var itemNum
function setText()
{
   currentCat=$tL(_m[getMenuByItem(_itemRef)][1])

   if(currentCat=="schools")
   {
      if(_mi[_itemRef][1]=="&nbsp")
      {
         document.forms['Simple']['School'+itemNum].value=""
      }
      else
      {
         document.forms['Simple']['School'+itemNum].value=_mi[_itemRef][1]
      }
   }
   if(currentCat=="grades")
   {
      if(_mi[_itemRef][1]=="&nbsp")
      {
         document.forms['Simple']['Grade'+itemNum].value=""
      }
      else
      {
         document.forms['Simple']['Grade'+itemNum].value=_mi[_itemRef][1]
      }
   }
   
   if(currentCat=="instruments")
   {
      if(_mi[_itemRef][1]=="&nbsp")
      {
         document.forms['Simple']['Instrument'+itemNum].value=""
      }
      else
      {
         document.forms['Simple']['Instrument'+itemNum].value=_mi[_itemRef][1]
      }
   }
   

   if(currentCat=="preferences")
   {
      if(_mi[_itemRef][1]=="&nbsp")
      {
         document.forms['Simple']['Preference'+itemNum].value=""
      }
      else
      {
         document.forms['Simple']['Preference'+itemNum].value=_mi[_itemRef][1]
      }
   }
   closeAllMenus()
}

_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_subOffsetTop=-1             // Sub menu top offset
_subOffsetLeft=0            // Sub menu left offset


with(menuStyle=new mm_style()){
oncolor="#ffffff";
offcolor="#000000";
onbgcolor="#316ac5";
offbgcolor="#ffffff";
bordercolor="#000000";
borderwidth=1;
padding=2;
fontsize="90%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
status="";
clickfunction="setText()";
borderwidth=1
}

with(new menuname("Schools")){
style=menuStyle;
overflow="scroll"
position="absolute"
aI("text=Aldrich JH");
aI("text=All Saints Academy");
aI("text=Bain MS");
aI("text=Barrington HS");
aI("text=Barrington MS");
aI("text=Bishop Hendricken");
aI("text=Broad Rock MS");
aI("text=Burrillville HS");
aI("text=Burrillville MS");
aI("text=Chariho HS");
aI("text=Chariho MS");
aI("text=Cranston-Johnston CRHS");
aI("text=Classical HS");
aI("text=Cole JH");
aI("text=Coventry HS");
aI("text=Cranston East");
aI("text=Cranston West");
aI("text= ");
}


with(new menuname("Grades")){
style=menuStyle;
top="offset=-15"
itemwidth=50
aI("text=6");
aI("text=7");
aI("text=8");
aI("text=9");
aI("text=10");
aI("text=11");
aI("text=12");
aI("text= ");
}


with(new menuname("Instruments")){
style=menuStyle;
overflow="scroll"
position="absolute"
aI("text=Jazz-Bass");
aI("text=Jazz-Drums");
aI("text=Jazz-Guitar");
aI("text=Jazz-Piano");
aI("text=Jazz-Saxophone-Alto");
aI("text=Jazz-Saxophone-Baritone");
aI("text=Jazz-Saxophone-Tenor");
aI("text=Jazz-Trombone");
aI("text=Jazz-Trumpet");
aI("text= ");
}

with(new menuname("Preferences")){
style=menuStyle;
top="offset=-15"
itemwidth=70
aI("text=Chorus");
aI("text=Band");
aI("text=Orchestra");
aI("text= ");
}
drawMenus()[/color][/size]


Thank you.

~Wayne


Poster: Andy
Dated: Tuesday November 22 2005 - 16:25:32 GMT

Hi,

It looks like there are some problems with the files, when I look at http://rimea.org/new/java/milonic_src.js it contains some HTML code and not JavaScript.

Could these files be corrupt by any chance?

-- Andy


Poster: wkilc
Dated: Wednesday November 23 2005 - 1:17:57 GMT

AHA!!!

I am an idiot :oops: ... I've been coding too long... the path was invalid... works fine now.

Andy... can you please check out my other thread if you get a second:

http://milonic.com/forum/viewtopic.php?t=6749

Thanks again!!!

~Wayne


Poster: wkilc
Dated: Wednesday November 23 2005 - 2:53:51 GMT

Whoops! Spoke to soon...

This page:
http://rimea.org/forms/allstate/test1.html

Using the latest script... still not working right... no JS errors.. and the menu eventually appears. It "flickers" in Firefox and then goes away.

Here's something... tabbing into the fields works fine... clicking does not.

Hmmm.

Thanks.

~Wayne


Poster: wkilc
Dated: Wednesday November 23 2005 - 21:07:25 GMT

bump... (sorry)

~Wayne


Poster: Andy
Dated: Friday November 25 2005 - 12:20:13 GMT

Fixed

See post http://www.milonic.com/forum/viewtopic.php?t=6774