Top level menu item does not open url in target frame

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:

Top level menu item does not open url in target frame

Post by Alan.Hancock@jet.uk »

When I click on the text of a top level menu then the url opens in the frame occupied by the menu not the frame specified by target=E3. If I click on the background to the menu text then the url opens in the E3 frame as specified by target=E3 for the select menu item. If I create a submenu then the behaviour is as expected and the target=E3 frame is always used regardless of where I click on a menu item text or menu item background. Is this a bug or feature? Any chance of a fix or work around to this problem?
:?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Alan, v5 is not (yet) frames friendly (actually, neither are we! :D ). It's on the list, however. Meanwhile, there is an unsupported hack that seems to work in frames. Do a Search to find the threads.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Alan,
John wrote:Alan, v5 is not (yet) frames friendly (actually, neither are we! :D ).

I'm not sure which "we" John meant, and I know he's partly kidding around, but I thought I'd mention that I personally have nothing against frames. ;)

If you can post a url to the site in question, or to a testing site/page, we can have a look and try to figure out what's going on.

Cheers,

Kevin
Alan.Hancock@jet.uk
Advanced
Advanced
Posts: 11
Joined: Thu Jul 01, 2004 10:45 am
Location: Abingdon, UK
Contact:

Test for Menu in frame and target to frame problem

Post by Alan.Hancock@jet.uk »

I cannot post a URL because the menu is for an intranet . I think it should be easy to demontrate the problem by creating a page with 2 frames in it named E2 and E3 then in menu code for E2 frame as below make target for a menu item to be the frame E3 and do this for a menu item at the top level an then at second level. Observe behaviour when clicking on menu text and menu background area, clicking on background seems to work as expected but clicking on text at top level loads URL into E2 frame (same frame as menu) instead of E3. The expected correct behaviour works only at levels below top level?

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="75%";
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("Main Menu")){
style=menuStyle;
top=0;
left=0;
alwaysvisible=1;
orientation="horizontal";
// aI("text=Electra Database;url=//electrahost.jet.efda.org;align=left;pointer=move;fontweight=bold;target=E2;");
aI("text=Electra Database;showmenu=Electra Home;align=left;fontweight=bold;");
aI("text=CODAS;showmenu=CODAS;align=left;fontweight=bold;");
aI("text=Documentation;showmenu=Documentation;align=left;fontweight=bold;");
}

with(milonic=new menuname("Electra Home")){
style=menuStyle;
overflow="scroll";
alwaysvisible=1;
orientation="horizontal";
// top=20;
// left=60;
aI("text=Activity;url=activity/index.html;align=left;target=E2;");
aI("text=Administration;url=administration/index.html;align=left;target=E2;");
aI("text=BCN url=bcnsearch.html;align=left;target=E2;");
aI("text=Cable Search;showmenu=Cables;dragable=0;");
aI("text=CISS;url=ciss/index.html;align=left;target=E2;");
aI("text=Cubicles;url=cubicles/index.html;align=left;target=E2;");
aI("text=Forms;showmenu=Forms;dragable=0;");
aI("text=Functional Position;url=funcposn/index.html;align=left;target=E2;");
aI("text=IP Hostname;url=iphostnames/index.html;align=left;target=E2;");
aI("text=Items/Itemtypes;showmenu=Items;dragable=0;");
aI("text=JETnet PCs;showmenu=JETnet PCs;dragable=0;");
aI("text=Mail Lists;url=maillists/index.html;align=left;target=E2;");
aI("text=People;url=person/indexnew.html;align=left;target=E2;");
aI("text=Publications;url=publications/frame.html;align=left;target=_parent;");
aI("text=Reports/Checks;url=reports/index.html;align=left;target=E2;");
aI("text=Signal;url=signals/index.html;align=left;target=E2;");
aI("text=Subsystem;url=subsys/index.html;align=left;target=E2;");
aI("text=VME Crate;url=/elbin/funcposn?cmd=vmecrates;align=left;target=E3;");
// Menu separator
// aI("text=_______________;type=header;");
}

with(milonic=new menuname("CODAS")){
style=menuStyle;
overflow="scroll";
aI("text=Electrahost Home;url=//electrahost.jet.efda.org;align=left;target=E3;");
aI("text=Mail Electra Administrators;url=mailto:electra@jet.efda.org;align=left;");
aI("text=Execute SQL;url=processSQL/SSI/processSQL.shtml;align=left;target=E3;");
aI("text=CODAS Home;url=http://w3.jet.uk/CODAS;align=left;target=_parent;");
}

with(milonic=new menuname("Cables")){
style=menuStyle;
overflow="scroll";
aI("text=Assemblies Query;url=/perl/wdb.cgi/electra/CABLEASM/form;target=E3;");
aI("text=Register Query;url=/perl/wdb.cgi/electra/CABLEREG/form;target=E3;");
aI("text=Types Query;url=/perl/wdb.cgi/electra/CABLETYP/form;target=E3;");
aI("text=Control Room Structured Cabling;url=/electra/cablereg/CRSC/tracecrsc.html;target=E2;");
aI("text=JETnet Patching;url=/electra/cablereg/JNOP/tracejnop.html;target=E2;");
}

with(milonic=new menuname("Documentation")){
style=menuStyle;
overflow="scroll";
aI("text=Electra;url=/electra/documentation/electradoc/;align=left;target=E3;");
aI("text=MIMER;url=/electra/documentation/mimerdoc/;align=left;target=E3;");
aI("text=CDC++;url=docudraw/SSI/index.shtml;align=left;target=E2;");
aI("text=Glossary;url=glossary/index.html;align=left;target=E3;pointer=help;");
}

with(milonic=new menuname("Forms")){
style=menuStyle;
overflow="scroll";
aI("text=Form 20;url=f20jobs/index.html;target=E2;");
aI("text=Form 70;url=f70jobs/frame.html;target=_parent;");
aI("text=Form 78;url=f78jobs/index.html;target=E2;");
}

with(milonic=new menuname("Items")){
style=menuStyle;
overflow="scroll";
aI("text=Item;url=item/index.html;target=E2;");
aI("text=Itemtype;url=itemtype/index.html;target=E2;");
}

with(milonic=new menuname("JETnet PCs")){
style=menuStyle;
overflow="scroll";
aI("text=PC Diagnostics;url=pcdiag/index.html;target=E2;");
aI("text=Inventory;url=pcinventory/index.html;target=E2;");
aI("text=Job Control;url=pcjob/index.html;target=E2;");
aI("text=S/W Licences;url=licence/index.html;target=E2;");
}

drawMenus();
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Alan,

Only Andy can confirm, but I think you may have uncovered an issue with recent releases. I did the test (in ie6/win2k) and got the behavior you described. Odd.

A workaround that I just tried, that worked, is to insert an invisible dummy menu in your menu_data.js file, before the code for your main menu,like so:

Code: Select all

with(milonic=new menuname("dummyMenu")){
style=menuStyle;
top=-200;
left=0;
alwaysvisible=1;
aI("text=;");
}
This menu will not be visible to the user, because top=-200 will place if off of the viewable area. This workaround worked (don't know why) with another recent main menu oddity. I just tested it with this one, and it solved the frame targeting issue. I'm confident that the internal issue will be worked out soon.

Meanwhile... I would suggest that you do not upgrade to 5.31. The same problem manifests a little differently in 5.31, and the workaround I tried didn't work in 5.31; it worked in 5.3.

Hope that helps,

Kevin
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Just tested it and saw nothing wrong. As long as the target is correct it should be fine.

Again, we are going to need to see this problem in the flesh, I can't reproduce it.

Cheers
Andy
Alan.Hancock@jet.uk
Advanced
Advanced
Posts: 11
Joined: Thu Jul 01, 2004 10:45 am
Location: Abingdon, UK
Contact:

Dummy menu item work around for FRAME as target problem

Post by Alan.Hancock@jet.uk »

Kevin,
I tried your solution using the dummyMenu code you posted in menu_data.js file, that does serve as a work around to my problem. :D
Thanks very much for quick response to this and for tip regarding not moving to v5.31.

Alan
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Alan wrote:Kevin,
I tried your solution using the dummyMenu code you posted in menu_data.js file, that does serve as a work around to my problem.
Thanks very much for quick response to this and for tip regarding not moving to v5.31.

You're welcome. Thanks for the thanks ;)
Andy wrote:Just tested it and saw nothing wrong. As long as the target is correct it should be fine. Again, we are going to need to see this problem in the flesh, I can't reproduce it.
Andy,

I've posted my tests on the support domain so you can have a go at them. I got the problem to show in ie6/win2k.

- v5.30 test

- Current Release test

Kevin
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Version 5.31b should fix the issues.

Cheers
Andy
Alan.Hancock@jet.uk
Advanced
Advanced
Posts: 11
Joined: Thu Jul 01, 2004 10:45 am
Location: Abingdon, UK
Contact:

V5.31b solves menu problem, but further form input problem

Post by Alan.Hancock@jet.uk »

Confirm that this solves my problem so that I can now take out call to off screen dummy menu item. But have discovered problem with HTML input forms that may also be worked aroundby 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, but the same menu item works fine if a dummy first item is included. This looks like a similar bug to the menu activation problem :? - see code below:

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; 
//    We now use find_name_f70 with Mimer v8.2 Soundex searching capability 
//    as developed from find_name for Form70 initial search of PERSON table.
//    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=;"); 
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:

Further to form input problem with v5.30 - V5.31b

Post by Alan.Hancock@jet.uk »

Also the code in previous message shows a further problem with the link going to the wrong frame if this code is invoked as part of a frameset, even if I include an off screen dummy menu item :?:
Post Reply