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: Thursday February 8 2018 - 06:02:49

"popup()" stopped working in most browsers


Poster: Maestro
Dated: Saturday April 9 2005 - 0:05:11 BST

I have put up a short movie that demonstrates the problem.
Click Here

I'm using "popup()" inside a form text field like this..

Code: Select all

<form name="form1" action="/pages/searchResults.lasso">
   <a href="#" onclick="document.form1.submit(); return true;">
      <img src="/images/binocs.jpg" align="middle" border="0" hspace="4">
   </a>
   <input onfocus="popup('TopSearch');" style="background-color:#EBE689; text-align:center; font-size:9pt" type="text" name="simplesearch" size="15">
</form>


You can try it out yourself right here. HINT: click inside the search field next to the yellow binoculars.

If you're in Safari, it should work; but forget it in any other browser.
Funny thing is, it did work - until I upgraded from Milonic Menu 5.6(something) to version 5.719.

Here's the data file - note: this has been incorporated into a Lasso page, but that is not the problem here; as I said, it worked before the upgrade..
{ the style definition that applies to this issue is "AdvancedSearchSubTabStyle" }

Code: Select all

[noProcess]
/*
Milonic DHTML Menu - JavaScript Website Navigation System.
Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
Version 5+ Data File structure is the property of Milonic Solutions Ltd and must only be used in Milonic DHTML Products
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times
*******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  *******
*/

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


// DEFINE any custom functions next..
/*
See: http://www.milonic.com/forum/viewtopic.php?p=14348#14348 for a full explanation
*/
function mm_changeItemProperty(menuName, itemName, codeRef, newValue, updateDisplay)
{
  menuName = menuName.toLowerCase();
  for (i=0; i<_mi.length; i++)
    if (_mi[i][1].replace(/\&nbsp\;/ig,' ') == itemName && _m[_mi[i][0]][1] == menuName) break;
  if (i == _mi.length) return;
  _mi[i][codeRef] = newValue;
  if (updateDisplay) BDMenu(_mi[i][0]);
}

/*
See: http://www.milonic.com/forum/viewtopic.php?t=4853&highlight=type+form for a full explanation
*/
function mm_changeMenuProperty(menuName, propertyRef, newValue)
{
  var menuNum = getMenuByName(menuName);
  _m[menuNum][propertyRef] = newValue;
  BDMenu(menuNum);
}


// DEFINE the styles used by the various menues & sub menues

with(TopMainMenuStyle=new mm_style()){
openonclick=0;
closeonclick=1;
oncolor="#ffffff";
onborder='0px solid #ffffff';
offcolor="#ffffff";
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
headercolor="#FBDFB4";
headerbgcolor="none";
bordercolor="none";
}

with(TopSubTwoHeaderStyle=new mm_style()){
followscroll=0;
openonclick=0;
closeonclick=1;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
bgimage="/images/trans_BlueGrey.png";
align="right";
valign="middle";
bordercolor="#FFFFFF";
borderwidth="1px";
borderstyle="solid";
padding="2px";
onborder='0px solid #ffffff';
}


with(TopPDFsByDepartmentStyle=new mm_style()){
openonclick=0;
closeonclick=1;
onbgcolor="#ccffcc";
oncolor="#000000";
offbgcolor="#cccccc";
offcolor="#99061C";
bordercolor="#292B4A";
borderstyle="solid";
borderwidth=1;
padding=5;
fontsize="12px";
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
headercolor="#FFFFFF";
headerbgcolor="#292B4A";
imagepadding="0 20 0 10";
onborder='0px solid #ffffff';
}


with(AdvancedSearchSubTabStyle=new mm_style()){
//closeonclick=1;
retainClickValue=1;
onbgcolor="#ccffcc";
oncolor="#000000";
offbgcolor="#cccccc";
offcolor="#0000CC";
bordercolor="#292B4A";
borderstyle="solid";
borderwidth=1;
padding=5;
fontsize="12px";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
headercolor="#FFFFFF";
headerbgcolor="#292B4A";
imagepadding="0 20 0 10";
onborder='0px solid #ffffff';
}



/* These are variants of the TopMainMenuStyle */
TopSubOneMainMenuStyle=new copyOf(TopMainMenuStyle);
TopSubOneMainMenuStyle.bgimage="/images/trans_BlueGrey.png";
//TopSubOneMainMenuStyle.menubgcolor="#cccccc";
TopSubOneMainMenuStyle.offcolor="#FFFFFF";
TopSubOneMainMenuStyle.offbgcolor="#FFFFFF";
TopSubOneMainMenuStyle.pageborder='1px solid #ffffff';;
TopSubOneMainMenuStyle.padding="3 10 3 10";
TopSubOneMainMenuStyle.valign="bottom";


/* These are variants of the TopMainMenuStyle - One layer down */
TopSubTwoMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
TopSubTwoMainMenuStyle.padding=5;
TopSubOneMainMenuStyle.bgimage="/images/trans_BlueGrey.png";
TopSubTwoMainMenuStyle.overbgimage="/images/overSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.pagebgimage="/images/inverseSubTwoNav_bg.gif";
TopSubTwoMainMenuStyle.onbgcolor="none";
TopSubTwoMainMenuStyle.separatoralign="left";
//TopSubTwoMainMenuStyle.separatorwidth="221";
TopSubTwoMainMenuStyle.pageborder="none";
TopSubTwoMainMenuStyle.oncolor="#2847AA";

/* These are variants of the TopMainMenuStyle - Two layers down */
TopSubThreeMainMenuStyle=new copyOf(TopSubOneMainMenuStyle);
TopSubThreeMainMenuStyle.openonclick=0;
TopSubThreeMainMenuStyle.align="center";
TopSubThreeMainMenuStyle.offcolor="#FBDFB4";
TopSubThreeMainMenuStyle.offbgcolor="#292B4A";
TopSubThreeMainMenuStyle.oncolor="gold";
TopSubThreeMainMenuStyle.onbgcolor="#292B4A";
TopSubThreeMainMenuStyle.bgimage="none";
TopSubThreeMainMenuStyle.bordercolor="#292B4A";
TopSubThreeMainMenuStyle.borderstyle="solid";
TopSubThreeMainMenuStyle.borderwidth=0;
TopSubThreeMainMenuStyle.imagepadding="0 15 0 15";
[/noprocess]
[include: 'menu_dataGen.lasso']
[noprocess]

// Simple search
with(milonic=new menuname("TopSearch")){
style=TopSubTwoHeaderStyle;
screenposition="left";
left="11";
top="91";
itemwidth=578;
aI("type=header;rawcss=font-variant:small-caps;text=<br><center><font color=#FBDFB4>Do a simple search of this site ... search every document in every department</font></center>;");
aI("openonclick=0;bgimage=/images/solidblue.gif;itemheight=60;text=<font color=white size=-2>As an alternative, try out our</font> <u><font color=white style=font-variant:small-caps>ADVANCED SEARCH</font></u>&nbsp;&nbsp;;fontsize=75%;align=right;url=/pages/advancedSearch.lasso;");
}

// Sub search (advanced) tab
with(milonic=new menuname("AdvancedSearch")){
style=AdvancedSearchSubTabStyle;
top="offset=68";
itemwidth=577;
aI("text=The Advanced Search Form or whatever you're using for advanced search will open here..;align=right;");
 }
 

// Example, using TopMyCity of form when "type=header"
with(milonic=new menuname("TopMyCity")){
style=TopSubTwoHeaderStyle;
screenposition="left";
top="91";
itemwidth=577;
//aI("type=header;rawcss=font-variant:small-caps;text=<form name=form2 action=http://pdaoutlet.biz/cgi-bin/mail.cgi><input type=hidden name=flavor value=subscribe><input type=hidden name=list value=pda><font color=#FBDFB4>Our Newsletter... </font><input style=background-color:#EBE689 type=text name=email> <input type=submit value=Subscribe></form>;");
}

drawMenus();

[/noprocess]


Poster: Ruth
Dated: Saturday April 9 2005 - 1:47:01 BST

Just to add to the info available, because this isn't something I could address, it does work in IE5.5, Opera 7.54. And, it works in Netscape 7.1 and Firefox 1.0.2 but only if you right click and hold that click. As soon as you release the click the pop up disappears. So, if you right click and let go immediately it goes so fast it's almost as if it hasn't popped.

Ruth


Poster: Maestro
Dated: Saturday April 9 2005 - 8:32:26 BST

So, does anyone have a solution?
( please say yes.. ) :|