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:07
Random spaces appearing between menu items
Poster: stuii
Dated: Monday October 11 2004 - 19:38:18 BST
I have a bizzare problem which is plaguing me somewhat. This is my second Milonic installation, and the problem does not occur on the first.
On some menus I get random gaps appearing between menu items, please see http://xequerin.mysh.rhydio.com/~sbf01/milonic.png for an example.
The gaps, whilst random in their occurance and size, always happen in the same menus and with the same menu items.
Unfortunately I can't provide access to the site itself as it's an intranet, but suffice to say that I've checked that there are no erroneous faults in the menu definition code, assuming of course that it's not whitespace sensitive (and even if it is, there's no discernable pattern to where the spaces appear and how the equivalent code is arranged).
Any help would be greatly appreciated.
Thanks
Stuii[/url]
Poster: John
Dated: Monday October 11 2004 - 20:45:29 BST
We'll need to see a little more, Stuii. Please post your _data file here (remember to use the [code][/code] tags!). Also, exactly what version of the menu are you running?
Poster: stuii
Dated: Monday October 11 2004 - 20:51:36 BST
John wrote:
We'll need to see a little more, Stuii. Please post your _data file here (remember to use the
Code:
tags!). Also, exactly what version of the menu are you running?Here is the code. The odd spacing in some parts of it is due to it being generated by a PHP script, but the spacing seems to make no difference to the problem. I've also had to obfuscate some URLs in it for security reasons, where I have done this you will see "escaped_url".
Menu version is the latest version (5.49) downloaded and licensed today.
Thanks
Stuii
Code:
_menuCloseDelay=600 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
// global menu style
with (menuStyle=new mm_style()) {
onbgcolor="#BFE6B8";
oncolor="#000000";
offbgcolor="#FFFFFF";
offcolor="#333333";
clickbgcolor="#EEEEEE";
pagebgcolor="#CCCCCC";
pagecolor="#000000";
bordercolor="#0C2675";
borderstyle="solid";
borderwidth=1;
separatorcolor="";
separatorsize="1";
padding=5;
fontsize="9pt";
fontstyle="normal";
fontfamily="Tahoma, Verdana, Helvetica, Arial, sans-serif";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/images/menuarrow-right.gif";
subimagepadding="0 6 0 0";
}
// root menu style
with (rootStyle=new mm_style()) {
onbgcolor="#EEEEEE";
oncolor="#000000";
offbgcolor="#BFE6B8";
offcolor="#000000";
pagebgcolor="#CCCCCC";
pagecolor="#000000";
bordercolor="#0C2675";
borderstyle="solid";
borderwidth=1;
separatorcolor="#0C2675";
separatorsize="1";
padding=5;
fontsize="9pt";
fontstyle="normal";
fontfamily="Tahoma, Verdana, Helvetica, Arial, sans-serif";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/images/menuarrow-down.gif";
subimagepadding="0 6 0 0";
}
// main menu is contructed in pagehead.inc and menusystem.inc
// Common Functions menu
with (milonic = new menuname("Common Functions")) {
style = menuStyle;
aI("text=Select company;url=/menu.php;");
aI("text=Customers & Prospects;url=/mods/common_tools/customeradmin.php;");
aI("text=Multi-View Announcements;url=/mods/common_tools/mvasadmin.php;");
}
// Accounts menu
with (milonic = new menuname("Accounts")) {
style = menuStyle;
aI("text=Bank Account Management;url=/mods/accounts/bankaccounts.php;");
aI("text=Cashbook Tools;url=/mods/accounts/cashbooktools.php;");
}
// Paperwork menu
with (milonic = new menuname("Paperwork")) {
style = menuStyle;
aI("text=Document source management;url=/mods/paperwork/sourcetools.php;");
aI("text=Document archive management;url=/mods/paperwork/archivetools.php;");
aI("text=Unprocessed queue management;url=/mods/paperwork/queuecontrol.php;");
}
// Support Functions menu
with (milonic = new menuname("Support Functions")) {
style = menuStyle;
aI("text=Help on this page;url=javascript:openHelpPanel();");
aI("text=Webmail;url=/core/frame.php?pagetitle=Webmail&path=%2Fmods%2Fthird_party%2Fwebmail%2F;");
aI("text=Currency converter;url=/mods/third_party/currencyconv.php;");
aI("text=E-mail RHYACS support team;url=address __at__ domain.com;");
aI("text=Logout;url=/logout.php;");
}
// RHYACS Admin menu
with (milonic = new menuname("Master Admin")) {
style = menuStyle;
aI("text=Company administration;url=/mods/rhyacs_admin/companyadmin.php;");
aI("text=Employee administration;url=/mods/rhyacs_admin/employeeadmin.php;");
aI("text=Audit log analysis;url=/mods/rhyacs_admin/loganalysis.php;");
aI("text=CUPS printing administration;url=/core/frame.php?pagetitle=CUPS+Administration&path=escaped_url;");
aI("text=Web access statistics;url=/core/frame.php?pagetitle=Site+Access+Statistics&path=escaped_url;");
}
// Specific menu
with (milonic = new menuname("Specific")) {
style = menuStyle;
aI("text=Colour Charts & Tools;url=/comspec/rhy/devresources/colourcharts.php;");
aI("text=Rhydio Development Support (MANTIS);url=/core/frame.php?pagetitle=Rhydio+Development+Support&path=escaped_url;");
}
// Specific submenus
drawMenus();
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
// global menu style
with (menuStyle=new mm_style()) {
onbgcolor="#BFE6B8";
oncolor="#000000";
offbgcolor="#FFFFFF";
offcolor="#333333";
clickbgcolor="#EEEEEE";
pagebgcolor="#CCCCCC";
pagecolor="#000000";
bordercolor="#0C2675";
borderstyle="solid";
borderwidth=1;
separatorcolor="";
separatorsize="1";
padding=5;
fontsize="9pt";
fontstyle="normal";
fontfamily="Tahoma, Verdana, Helvetica, Arial, sans-serif";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/images/menuarrow-right.gif";
subimagepadding="0 6 0 0";
}
// root menu style
with (rootStyle=new mm_style()) {
onbgcolor="#EEEEEE";
oncolor="#000000";
offbgcolor="#BFE6B8";
offcolor="#000000";
pagebgcolor="#CCCCCC";
pagecolor="#000000";
bordercolor="#0C2675";
borderstyle="solid";
borderwidth=1;
separatorcolor="#0C2675";
separatorsize="1";
padding=5;
fontsize="9pt";
fontstyle="normal";
fontfamily="Tahoma, Verdana, Helvetica, Arial, sans-serif";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="/images/menuarrow-down.gif";
subimagepadding="0 6 0 0";
}
// main menu is contructed in pagehead.inc and menusystem.inc
// Common Functions menu
with (milonic = new menuname("Common Functions")) {
style = menuStyle;
aI("text=Select company;url=/menu.php;");
aI("text=Customers & Prospects;url=/mods/common_tools/customeradmin.php;");
aI("text=Multi-View Announcements;url=/mods/common_tools/mvasadmin.php;");
}
// Accounts menu
with (milonic = new menuname("Accounts")) {
style = menuStyle;
aI("text=Bank Account Management;url=/mods/accounts/bankaccounts.php;");
aI("text=Cashbook Tools;url=/mods/accounts/cashbooktools.php;");
}
// Paperwork menu
with (milonic = new menuname("Paperwork")) {
style = menuStyle;
aI("text=Document source management;url=/mods/paperwork/sourcetools.php;");
aI("text=Document archive management;url=/mods/paperwork/archivetools.php;");
aI("text=Unprocessed queue management;url=/mods/paperwork/queuecontrol.php;");
}
// Support Functions menu
with (milonic = new menuname("Support Functions")) {
style = menuStyle;
aI("text=Help on this page;url=javascript:openHelpPanel();");
aI("text=Webmail;url=/core/frame.php?pagetitle=Webmail&path=%2Fmods%2Fthird_party%2Fwebmail%2F;");
aI("text=Currency converter;url=/mods/third_party/currencyconv.php;");
aI("text=E-mail RHYACS support team;url=address __at__ domain.com;");
aI("text=Logout;url=/logout.php;");
}
// RHYACS Admin menu
with (milonic = new menuname("Master Admin")) {
style = menuStyle;
aI("text=Company administration;url=/mods/rhyacs_admin/companyadmin.php;");
aI("text=Employee administration;url=/mods/rhyacs_admin/employeeadmin.php;");
aI("text=Audit log analysis;url=/mods/rhyacs_admin/loganalysis.php;");
aI("text=CUPS printing administration;url=/core/frame.php?pagetitle=CUPS+Administration&path=escaped_url;");
aI("text=Web access statistics;url=/core/frame.php?pagetitle=Site+Access+Statistics&path=escaped_url;");
}
// Specific menu
with (milonic = new menuname("Specific")) {
style = menuStyle;
aI("text=Colour Charts & Tools;url=/comspec/rhy/devresources/colourcharts.php;");
aI("text=Rhydio Development Support (MANTIS);url=/core/frame.php?pagetitle=Rhydio+Development+Support&path=escaped_url;");
}
// Specific submenus
drawMenus();
Poster: John
Dated: Monday October 11 2004 - 21:39:39 BST
While my method does not fully duplicate what you are doing, I am unable to get the spacing to change as shown in your graphic. See http://www.west.asu.edu/sa/testsite/. I made the one menu visible, removed the extra whitespace, and just reload the page over and over. Not a true test, but it's about as far as I can go at this point.
Perhaps another idea from one of the Team.
Poster: kevin3442
Dated: Tuesday October 12 2004 - 0:56:40 BST
Stuii,
The fact that your "Master Admin" menu (in the code you posted) doesn't have alwaysvisible=1; set makes me wonder if you have that menu duplicated in your main page, placed inside of a table cell. Is that so? if so, can you post the code (html output from your php) from a page where you see the problem? Also, do you have any .css styles defined? If so, can you post those as well? I can't duplicate the problem either with what you've posted.
What browser/OS are you using?
Kevin
Poster: Maz
Dated: Tuesday October 12 2004 - 8:33:38 BST
Can I join the guessing game
From what's posted there are lines of space between the menu items, is it possible there are hidden characters?
Or try putting a new return between them.
maz
Poster: stuii
Dated: Tuesday October 12 2004 - 11:51:00 BST
Thank you all for your help.
John - your demo does indeed work fine, which is inexplicable because all you've done is remove the whitespace, yet no amount of whitespace adding or removing makes any difference with my menu.
Kevin - the problem isn't restricted to just that menu, I showed it by way of example. Several other menus do the same thing, except the gaps are in different places and are different sizes, ranging from 1 pixel up to 6 or 7 pixels. Again, they appear randomly in the menus, but consistently in that they always appear in the same places. Those places, however, seem to be random, if you get what I mean.
Additionally there are no .css styles defined for the menu, it works independently of the site's stylesheet. I am using Windows XP SP2 with IE6 and the latest Firefox - same problem happens in both browsers, and in the same places.
Maz - I can't find any hidden characters in the code, and as mentioned above, no amount of whitespace jiggling seems to make a difference.
How frustrating!
Stuii
Poster: stuii
Dated: Tuesday October 12 2004 - 12:03:26 BST
Addendum:
Right, this gets odder! I've just added another submenu, and all the previous gaps in the menus have vanished!
But here's the catch - there are new ones, in new (although fewer) places, that have nothing to do with the new submenu.
I really wish I was kidding.
Any ideas?
Stuii
Poster: John
Dated: Tuesday October 12 2004 - 15:10:38 BST
Stuii, is there any way at all you can get this puppy out to a server we can get to? Leave the links as 'duds', move graphics into the same folder as the code files, etc., so you don't have to give away any URL or other info you don't want to.
We don't like to lose around here (and rarely, if ever, do we!), but I don't think we're going to get it piecemeal like this.
I know you said you removed whitespace on your end, but you might want to try my _data file just for grins - http://www.west.asu.edu/sa/testsite/menu_data.js. It's pointing to my images, but that's easily changed.
Poster: kevin3442
Dated: Tuesday October 12 2004 - 15:59:36 BST
Hi,
kevin3442 wrote:
...makes me wonder if you have that menu duplicated in your main page, placed inside of a table cell. Is that so? ... Also, do you have any .css styles defined?
stuii wrote:
...Kevin - the problem isn't restricted to just that menu, I showed it by way of example. Several other menus do the same thing,... Additionally there are no .css styles defined for the menu, it works independently of the site's stylesheet. I am using Windows XP SP2 with IE6 and the latest Firefox...
I'm still wondering:
(1) Do you have a "main" menu (alwaysvisible=1) inside of a table cell?
(2) Do you have any .css styles defined (not just for the menu). You said "it works independently of the site's stylesheet" so I assume that you do have styles defined. Sometimes css sort of "bleeds over" into the menu unexpectedly. That may well be the case here. Neither John nor I can reproduce the problem using the code you posted (me using IE6 in WinXP and Win2k). So, logically, it seems that there must be more to the problem than can be explained by the code you posted. Perhaps it's in the css. May we see it?
How about this... suppose you save the html output from one of your php pages, then test it by loading it locally, directly from your hard disk (no web server involvement). Still get the problem?
I know it's a pain, but if you could do as John suggests... make a live test site duplicating the problem... that would help us to help you.
Cheers,
Kevin
Poster: stuii
Dated: Tuesday October 12 2004 - 16:54:48 BST
No problem, I shall see what I can do, watch this space!
Stuii
Poster: Maz
Dated: Tuesday October 12 2004 - 20:30:35 BST
Notice you have an empty value in separator on mainstyle.
separatorcolor="";
separatorsize="1";
remove it if there's nothing.
maz
Resolved
Poster: stuii
Dated: Friday May 13 2005 - 18:03:48 BST
Hi chaps ...
I know this thread petered out - I moved on from the problem since the project the menu's installed in had other priorities, but this week I came back to it and discovered that the problem was solved by installing a different theme. There must've been an error in the theme I was using, although that is still baffling since I have the same theme in use on other sites elsewhere.
Still, all's well that ends well