FORM input focus bug has reappeared since V5.42

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Alan.Hancock@jet.uk
Advanced
Advanced
Posts: 11
Joined: Thu Jul 01, 2004 10:45 am
Location: Abingdon, UK
Contact:

FORM input focus bug has reappeared since V5.42

Post by Alan.Hancock@jet.uk »

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.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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
Alan.Hancock@jet.uk
Advanced
Advanced
Posts: 11
Joined: Thu Jul 01, 2004 10:45 am
Location: Abingdon, UK
Contact:

Post by Alan.Hancock@jet.uk »

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

Code: Select all


_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();
Alan.Hancock@jet.uk
Advanced
Advanced
Posts: 11
Joined: Thu Jul 01, 2004 10:45 am
Location: Abingdon, UK
Contact:

Simplified demonstration code of FORM input bug

Post by Alan.Hancock@jet.uk »

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: Select all

_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();
Post Reply