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

Need help from Team Leaders - menu anomaly happening


Poster: rudy
Dated: Sunday January 18 2004 - 15:24:27 GMT

URL to menu:
http://www.networkdriven.com/qp/TriviaQuiz_xp5.htm
When you get to this page with the menu, rollover the first tab on the left and slide down to the tab that says "Insalling XP Professional". This tab should NOT open a separate window but it does and I can't figure out why.
The showmenu=stories; does not have a url attached to it so it shouldn't open a window but it does.

I got the slide out submenu working but for some reason, the button that the slideout submenus slide off of opens a separate window.
I want tha button to just be the text on the button but not open a window.

Here is the code:

Code:
_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_followSpeed=5                // Follow scrolling speed
_followRate=50                // Follow scrolling Rate
_subOffsetTop=5               // Sub menu top offset
_subOffsetLeft=-10            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x



with(windows98style=new mm_style()){
onbgcolor="#000000";
oncolor="#FFFFFF";
offbgcolor="#FFAD73";
offcolor="#000000";
bordercolor="#BFBFBF";
borderstyle="raised";
borderwidth=2;
separatorsize="2";
padding=4;
fontsize="75%";
fontfamily="tahoma, verdana";
high3dcolor="#eeeeee";
low3dcolor="#7F7F7F";
swap3d="1";
}


with(milonic=new menuname("Main Menu")){
style=windows98style;
top=7;
screenposition="center";
alwaysvisible=1;
orientation="horizontal";
//aI("text=Home;url=http://www.networkdriven.com/index22.html;status=Back To Home Page;");
aI("text=IT Reference Topics;showmenu=Samples;status=Reference Topics");
aI("text=XP Jeopardy;showmenu=Milonic;status=XP Jeopardy;");
aI("text=Acronyms;showmenu=Partners;");
aI("text=Glossary;showmenu=Links;status=Information Technology Glossary of Terms;");
aI("text=XP Diagnostic Tools;showmenu=Anti Spam;status=Administrative and Diagnostic Tools;");
aI("text=Exams Menu;url=http://www.networkdriven.com/main_forwindowsxp.htm;status=   [ Return to Windows XP Exam Menu ]  Select Exam 1 through 5 or Final Exam;");
aI("text=Logout;url=http://www.networkdriven.com/index22.html;status=Back To Home Page;");
}

with(milonic=new menuname("Samples")){
style=windows98style;
overflow="scroll";
aI("text=Configuring Device Drivers;url=http://www.networkdriven.com/drivers.htm;target=_blank;targetfeatures=scrollbars=yes left=47 top=40 height=450;status=How To Install And Update Drivers;");
aI("text=Winddows XP System Restore;url=http://www.networkdriven.com/restore_points.htm;target=_blank;targetfeatures=scrollbars=yes left=47 top=40 height=450;status=Understanding The Windows XP System Restore Feature;");
//aI("text=Jeopardy;url=http://www.networkdriven.com/game_xp.htm;targetfeatures=width=770 height=525 top=1 left=10 toolbar=no;");
aI("text=Troubleshooting Windows XP;url=http://www.networkdriven.com/troubleshooting_win_xp.htm;targetfeatures=height=450 top=40 left=47 scrollbars=yes;status=Troubleshooting Windows XP Professional;");

aI("text=Installing XP Professional;showmenu=stories;");

//aI("text=Image Map Sample;url=menusample.php?sampleid=4;");
//aI("text=Multiple Styles;url=menusample.php?sampleid=5;");
//aI("text=Menus and Tool Tips;url=menusample.php?sampleid=6;");
//aI("text=Multiple Colored Menus;url=menusample.php?sampleid=7;");
//aI("text=Menu Items as Headers;url=menusample.php?sampleid=8;");
//aI("text=Windows XP Style Menus;url=menusample.php?sampleid=12;");
//aI("text=Windows 98 Style Menus;url=menusample.php?sampleid=13;");
//aI("text=Relative Positioning (Table Bound);url=menusample.php?sampleid=9;");
//aI("text=Follow Scrolling;url=menusample.php?sampleid=10;");
//aI("text=Opening Windows & Frames;url=menusample.php?sampleid=11;");
//aI("text=Hiding DIVs when displaying menus;url=menusample.php?sampleid=14;");
//aI("text=Activating MouseOver & MouseOut Functions;url=menusample.php?sampleid=15;");
//aI("text=Dynamic Dragable Menus;url=menusample.php?sampleid=22;");
//aI("text=Positioning with screenposition & offsets;url=menusample.php?sampleid=23;");
//aI("text=100% Width Span Menu;url=menusample.php?sampleid=26;");
//aI("text=Context Right Click Menu;url=menusample.php?sampleid=27;");
//aI("text=Static Images Sample;url=menusample.php?sampleid=16;");
//aI("text=Rollover/swap Images;url=menusample.php?sampleid=17;");
//aI("text=Menus built from images;url=menusample.php?sampleid=18;");
//aI("text=Images as Menu Backgrounds;url=menusample.php?sampleid=19;");
//aI("text=Background Menu Item Images;url=menusample.php?sampleid=20;");
//aI("text=short stories;showmenu=stories;");
}

with(milonic=new menuname("Milonic")){
style=windows98style;
aI("text=Play Windows XP Jeopardy;url=http://www.networkdriven.com/game_xp.htm;targetfeatures=width=770 height=525 top=1 left=10 toolbar=no;status=Play Windows XP Jeopardy;");
//aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
//aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
//aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
//aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
//aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
//aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}

with(milonic=new menuname("Partners")){
style=windows98style;
aI("text=Acronyms Lookup;url=http://www.networkdriven.com/acronyms_search_ccna.htm;target=_blank;targetfeatures=scrollbars=yes left=47 top=40 height=450;status=Acronyms Lookup;");
//aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
//aI("text=WebSmith;url=http://www.softidiom.com/;");
}

with(milonic=new menuname("Links")){
style=windows98style;
aI("text=Glossary Search Engine;url=http://www.networkdriven.com/glossary_alphabet_routing.htm;target=_blank;targetfeatures=scrollbars=yes left=47 top=40 height=450;status=Glossary Of Terms Search Engine;");
//aI("text=MySQL Database Server;url=http://ww.mysql.com/;status=MySQL, Milonic's Prefered Choice of Database Server;");
//aI("text=PHP - Development;url=http://www.php.net/;status=PHP - Web Server Scripting as used by Milonic;");
//aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;status=PHP Based Web Forum, Milonic's Recommended Forum Software;");
//aI("text=Anti Spam Tools;showmenu=Anti Spam;status=Anti Spam Solutions, as used by Milonic;");
}

with(milonic=new menuname("Anti Spam")){
style=windows98style;
aI("text=Running Disk Management Tool;url=http://www.networkdriven.com/xp_diagnostic_tools.htm;targetfeatures=height=450 top=40 left=47 scrollbars=yes;status=Learn to use the Administrative and Diagnostic Tools that come with Windows XP Professional;");
//aI("text=Mime Defang;url=http://www.mimedefang.org/;");
//aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}

with(milonic=new menuname("My Milonic")){
style=windows98style;
//aI("text=Login;url=http://www.milonic.com/login.php;");
//aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
//aI("text=Invoices;url=http://www.milonic.com/myinvoices;");
//aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
//aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
//aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}

with(milonic=new menuname("stories")){
style=windows98style;
aI("text=stories;url=http://www.milonic.com/login.php;");
aI("text=stories;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}

drawMenus();

[/code]


Poster: Ruth
Dated: Sunday January 18 2004 - 18:15:34 GMT

If you move the link which does the showmenu=stories to the top of that section BEFORE you begin the links which you have set to open in a new window, then the anomaly stops. I believe it's a bug that needs to be fixed. With rc 31 the problem does not occur, it begins with rc32 and forward. For now if you place any links that open a submenu from a submenu at the top of the list, it won't pick up the target= problem. I put a new topic to report it, and if it's something else and not a bug, I'm sure that topic will have an answer.

Code:
with(milonic=new menuname("IT Reference Topics")){
style=windows98style;
overflow="scroll";
aI("text=Installing XP Professional;showmenu=stories;");
aI("text=Configuring Device Drivers;url=http://www.networkdriven.com/drivers.htm;target=_blank;targetfeatures=scrollbars=yes left=47 top=40 height=450;status=How To Install And Update Drivers;");
aI("text=Winddows XP System Restore;url=http://www.networkdriven.com/restore_points.htm;target=_blank;targetfeatures=scrollbars=yes left=47 top=40 height=450;status=Understanding The Windows XP System Restore Feature;");
aI("text=Troubleshooting Windows XP;url=http://www.networkdriven.com/troubleshooting_win_xp.htm;targetfeatures=height=450 top=40 left=47 scrollbars=yes;status=Troubleshooting Windows XP Professional;");
aI("text=Installing XP Professional;url=http://www.networkdriven.com/installing_winxp_pro.htm;targetfeatures=height=450 top=40 left=47 scrollbars=yes;status=Installing Windows XP Professional;");
}

Ruth

I made a work-around for the anomaly in the submenu


Poster: rudy
Dated: Monday January 19 2004 - 1:07:01 GMT

Ruth,
Thanks for working on this problem for me again. I tried moving the showmenu to the top as you suggested, and it did work when you first click on the button that wasn't suppose to open a window. But, after I opened any of the other windows and then went back and clicked on the button again the problem reapears.

BTW, the problem with the code is not the target=_blank or even the targetfeatures=whatever, it's when I put in the left=whatever value and the top=whatever value, that the problem comes up.

So, this is what I have done for a work-around and I think it works pretty well.

I removed the left=whatever value and the top=whatever value and left in place the target=_blank and the targetfeatures=scrollbars, status=yes location=no and whatever other featues I want. Doing this removes the problem from having a window open when clicking on the button that slides out the submenu as this should be only the text in it and inactive (no URL attached).

So at this point all is working good with the menu, but this does not solve my desire to have the submenu windows always open in the same screen position (which in my case I like them to open right in the middle of the screen and positioned evernly from the left and right side of the screen as well as, the top and bottom of the screen.

So what I have done is put the positioning code to do this in the new window that opens.

This is the very simple code that I put in the new window that opens so it will be positioned where I want it each time it is clicked in the menu.

Code:
<body bgcolor=white text=black onLoad="resizeTo(700,475); moveTo(45,40);">


Note: the "resizeTo=the height and width and the moveTo=the top and left position. Of course the bgcolor and text color can also be changed.

(this could also be done using CSS positioning but this is so easy using the "onLoad handler" in the body tag of the new window file).

Now when the new window opens, it does jump a little as it repositions itself but it's no more annoying that have the new window open in the top left coner one time, the bottom left corner the next time, and so on, as it does by letting the browser decide where it is going to postion it.

You can see it in action here: http://www.networkdriven.com/qp/TriviaQuiz_xp5.htm

Here is how the code in the menu_data.js file looks, note the code used in the first aI in each menu section:

Code:
with(milonic=new menuname("XP Diagnostic Tools")){
style=windows98style;
aI("text=Running Disk Management Tool;url=http://www.networkdriven.com/xp_diagnostic_tools.htm;target=_blank;scrollbars=yes;status=Learn to use the Administrative and Diagnostic Tools that come with Windows XP Professional;");
//aI("text=Mime Defang;url=http://www.mimedefang.org/;");
//aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
aI("text=IT Reference Topics;showmenu=Setting Up a New Drive in Windows XP;");
}

with(milonic=new menuname("Setting Up a New Drive in Windows XP")){
style=windows98style;
aI("text=Setting Up a New Disk Drive in Windows XP;url=http://www.networkdriven.com/settingup_new_disk.htm;target=_blank;targetfeatures=scrollbars=yes location=no status=yes;");
aI("text=stories;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}


This works for me and is very simple to do... Works great I think.

Thanks again Ruth for all you work on my menu problem...


Poster: Ruth
Dated: Monday January 19 2004 - 3:21:26 GMT

I'm glad you found a workaround at least there's something until the bug is worked out. There is one I would have to think, since i used your page and your files which means the codes you have with those target features, and with rc 31 you can click that button all you want and no window opens, even if you click all the others and open windows for them, that one will not do anything, it will be inactive except to open the submenu as you mouseover it.