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

FORM input focus bug has reappeared since V5.42


Poster: Alan.Hancock __at__ jet.uk
Dated: Wednesday September 15 2004 - 17:55:41 BST

Have discovered problem with HTML input forms that may be worked around by inserting a dummy menu entry. If the first menu item is an input form then the focus for input disappears after a short while when clicking in the first menu item, if this is a combo box then the default selection flashes at a regular rate. What ever I do to the first menu item then I cannot get any input to work for that item, but the same menu item and form input work fine if a dummy first item is included. The versions realeased after V5.42 until V5.47 exhibit this behaviour but in earlier version the work around of including a dummy menu item could be used but now it must have some text after text= and type=form must be set. Suspect bug some sort of focus bug, my menu is held in a FRAMESET page.


Poster: Andy
Dated: Thursday September 16 2004 - 11:12:36 BST

Hi,

Do you have a URL that we can see?

There has been work on empty menu cells recently that is probably causing the problem. Seeing it, I'll be able to say for sure what the problem is and hopefully find a more stable solution.


Cheers
Andy


Poster: Alan.Hancock __at__ jet.uk
Dated: Monday September 20 2004 - 18:43:06 BST

Sorry no URL because page is on our Intranet, however example of code that shows the problem is included here:
Code:

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

with(menuStyle=new mm_style()){
onbgcolor="#0099ff";
oncolor="#ffff00";
offbgcolor="#DCE9F0";
offcolor="#515151";
separatorcolor="#2D729D";
separatorsize="2";
padding=5;
fontsize="70%";
fontstyle="normal";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/menu/darrow.gif";
subimagepadding="2";
bordercolor="#BFBFBF";
borderstyle="raised";
borderwidth=2;
fontfamily="tahoma, verdana";
high3dcolor="#eeeeee";
low3dcolor="#7F7F7F";
swap3d="1";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}

with(milonic=new menuname("QuickSearch")){
style=menuStyle;
top=2;
left=420;
overflow="scroll";
alwaysvisible=1;
//    Below dummy menu item included to work around problem of FORM input for
//    1st menu item also gets around problem of link going to wrong target frame.
//    Comment out next line to test effect of problem
// aI("text= ;type=form;");
aI("text=<form method=GET action=/elbin/get_membs target=E3 name=orgmemb>Organisational information for shortname<input name=EMAIL size=8><input type=submit value=Search></form>;type=form;align=right;");
aI("text=<form method=GET ACTION=/elbin/find_name_f70 target=E3 name=shortname>Shortname<input name=SHORTNAME size=8><select name=SOUNDEX><option value=UNIQUE>Unique Match<option value=NO>Contains Match<option value=NO>Sounds Like Match</select><input TYPE=hidden name=FULL value=NO><input TYPE=hidden name=UNIQUE value=><input TYPE=hidden name=CURRFLAG value=OFF><input TYPE=hidden name=MODE value=PERSON><input TYPE=hidden name=TARGET value=E3><input TYPE=hidden name=DEBUG value=OFF><input type=submit value=Search></form>;type=form;align=right;onbgcolor=;onborder=;");
aI("text=<form method=GET ACTION=/elbin/find_name_f70 target=E3 name=lastname>Last Name<input name=SURNAME size=14>  <select name=SOUNDEX><option value=YES>Sounds Like Match<option value=NO>Contains Match<option value=UNIQUE>Unique Match</select><input TYPE=hidden name=FULL value=NO><input TYPE=hidden name=UNIQUE value=><input TYPE=hidden name=CURRFLAG value=OFF><input TYPE=hidden name=MODE value=PERSON><input TYPE=hidden name=TARGET value=E3><input TYPE=hidden name=DEBUG value=OFF><input type=submit value=Search></form>;type=form;align=right;onbgcolor=;onborder=;");
}

drawMenus();

Simplified demonstration code of FORM input bug


Poster: Alan.Hancock __at__ jet.uk
Dated: Tuesday November 16 2004 - 16:44:51 GMT

Have discovered problem with HTML input forms when integrated into Milonic Menu system. If the menu item is an input form then the focus for input disappears after a short while when clicking in the first input field, if this is a combo box then the default selection flashes at a regular rate. What ever I do to the first menu item then I cannot get any input to work for that item, but the same menu item and form input work fine if a dummy first item is included. The versions realeased after V5.42 until V5.47 exhibit this behaviour but in earlier versions the work around of including a dummy form menu item could be used, but since V5.48 to V5.52 item must have some text after text= and type=form must be set. Suspect some sort of index bug, also the field that exhibits the problem is not passed as a parameter in the GET method, code sample included below demonstrates the problem.

Code:
_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=50             // The time delay before menus open on mouse over
_subOffsetTop=5               // Sub menu top offset
_subOffsetLeft=-10            // Sub menu left offset

with(menuStyle=new mm_style()){
onbgcolor="#0099ff";
oncolor="#ffff00";
offbgcolor="#DCE9F0";
offcolor="#515151";
separatorcolor="#2D729D";
separatorsize="2";
padding=5;
fontsize="70%";
fontstyle="normal";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimagepadding="2";
bordercolor="#BFBFBF";
borderstyle="raised";
borderwidth=2;
fontfamily="tahoma, verdana";
high3dcolor="#eeeeee";
low3dcolor="#7F7F7F";
swap3d="1";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}

with(milonic=new menuname("FormInputTest")){
style=menuStyle;
top=2;
left=420;
overflow="scroll";
alwaysvisible=1;
//    Below dummy menu item included to work around problem of FORM input for
//    1st menu item also gets around problem of link going to wrong target frame.
// The line below worked with versions prior to v5.48
// aI("text=;type=form;");
//    Include or exclude line below to test effect of problem
// aI("text=&nbsp;type=form;");
aI("text=<form name='input' action='http://www.w3schools.com/html/html_form_action.asp' method='get' enctype='multipart/form-data'>Type your first name:<input type='text' name='FirstName' value='Firstname input loses focus & not passed to GET!' size='60'>;type=form;align=left;");
aI("text=<br>Type your last name:<input type='text' name='LastName' value='Lastname' size='60'>;type=form;align=left;onbgcolor=;onborder=;");
aI("text=<br><p>If you click the 'Submit' button, you will send your input to a new page called html_form_action.asp.<input type='submit' value='Submit'></form>;type=form;align=left;onbgcolor=;onborder=;");
}

drawMenus();