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

opendelay problem


Poster: nboyad
Dated: Saturday September 30 2006 - 8:08:44 BST

Hello!
I have a problem with opendelay for the Shopping Cart on the http://surlatable.marketlive.com/ . The appearance of the upper box is not effected by openDelay value. I added horizontalMenuDelay=true, but it did not help. Can you please advice, what I am doing wrong.

Thank you


Poster: kevin3442
Dated: Sunday October 1 2006 - 6:21:26 BST

Hello Natalia,

You have the right idea, but you are applying the properties in the wrong places. You are using horizontalMenuDelay and opendelay as menu style properties, in your definition of menuStyleTopCart, but these are not style properties (you should take them out of menuStyleTopCart). You are also using both properties as menu properties in your MenuTopCart menu. horizontalMenuDelay is not a menu property. And although opendelay is a menu property, you have it in the wrong menu (you should remove both from your definition for MenuCartTop).

horizontalMenuDelay is a global property. It should be set, for example, in the same part of your code where you set _sububOffsetTop and _subOffsetLeft.

opendelay can be used either as a menu property or a menu item property. If used as a menu property, you would set opendelay in the menu whose opening you want to delay. In your case, you'd put it in the MenuCart menu (the one you want to delay). I.e.,
Code:
with(milonic=new menuname('MenuCart')){
style=menuStyleCart;
opendelay=300;
aI(...)
aI(...)
.
.
.
}

If used as a menu item property, you would set opendelay in the menu item that opens the menu you want to delay. In your case, that would be the single menu item you define in MenuCartTop, like so:
Code:
with(milonic=new menuname("MenuCartTop")){
style=menuStyleTopCart;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("showmenu=MenuCart;opendelay=300;text= ...;");
}


Note that you can do one or the other -- use it as a menu property (example 1) or a menu item property (example 2). You do not have to do both.

Hope that helps,

Kevin


Poster: nboyad
Dated: Monday October 2 2006 - 0:39:48 BST

Thank you for your reply.
To be able to do what I need it looks like I need delay for the hover on for the shopping cart. The upper table border shows up as a rsult of the applting the CSS style
.cartmenuTopOn {
width:173px;
font-size : 10px;
border-top: 1px solid #999999;
border-left: 1px solid #999999;
border-right: 1px solid #999999;
color : #541900;
background: #FFFFFF;
}

Are there any functions in your packeg that I can use to delay hover on?

Thank you.


Poster: Ruth
Dated: Monday October 2 2006 - 4:08:17 BST

Hi,

I'm getting a can't access url message.

I'm not sure what you mean by hover delay? The delays are for opening menus when you 'hover' as in mouseover their parent.

Ruth


Poster: nboyad
Dated: Monday October 2 2006 - 4:28:59 BST

Please try to access the site later. IT is doing the restart of the servers.
If you go with the mouse to the shopping cart, you will see that top border aroung the shopping cart shows very fast. I need delay on it.

Thank you,


Poster: kevin3442
Dated: Monday October 2 2006 - 4:48:36 BST

I think I understand the problem from the look I had at the site last night. The shopping cart menu item shows the mouseover effects as soon as the pointer... well... mouses over it. But the submeu appears after a delay. So you're left with an apparently-pointless mouseover effect until the submenu appears.

As far as I can recall (it's been a while), there is no built-in property to delay the mouseover effect. I will look around to see if I can verify this.

It may be possible to add some custom javascript to achieve the effect you want, but to go to that length may be more trouble than it's worth. It might be easier to not use the menu system for the shopping cart item. Instead, style it and handle mouseovers independently of the menu system. Then use the menu's popup() function to open the submenu (showing cart items) after an appropriate delay.

If you don't mind my asking... is the delay absolutely necessary? The visual problem of mouseover vs. submenu appearing would be avoided if you didn't have the delay.

Cheers,

Kevin


Poster: nboyad
Dated: Monday October 2 2006 - 4:56:31 BST

Thank you for your reply.
The reason why the client wants to have the delay is:

"The time delay on the menus works perfectly.
It works perfectly on the LOWER half of the perpetual cart.
But there is no time delay on the UPPER half of the perpetual cart. This causes half the perpetual cart effect to show before the other half."

The suggestion you gave to show the cart contetn in the pop-up is not going to work bacause we are at the last stage of the project and all specs are
signed off already.


Poster: kevin3442
Dated: Monday October 2 2006 - 5:30:55 BST

Hello,

I do understand the upper half/lower half issue; I noticed it last night. That's why I asked if the delay was absolutely necessary, because it is this delay that is causing the upper half to "appear" before the lower half. As you know, a mouseover effect on the actual moused over item is usually immediate, by its very nature. So your client is definitely asking for something out of the ordinary. There is no built-in property to delay the visual mouseover effects built into the menus. To achieve that effect is doable, but will require custom javascripting.

My suggestion for using popup() was not for a popup window. popup() is a method built into the Milonic menu system that can be used to open a submenu at a particular location. My thought was to style and control the upper half of the cart independently of the menu (i.e., don't make it a milonic menu), then call popup() at the appropriate time to display the lower half of the cart, which is still a menu. Just a different approach to achieve the same effect (or, more to the point, the desired effect).

Cheers,

Kevin


Poster: nboyad
Dated: Monday October 2 2006 - 5:35:33 BST

thank you, really appreaciate your fast responce and consern. Will try your approach with popup function.


Poster: Ruth
Dated: Monday October 2 2006 - 8:48:36 BST

Hi,

Another option would be to use Kevin's var subOffset and some changes in your css. I don't know that this would be acceptable, but you can try it and see.

add this right below your subOffsetTop and Left up at the top

Code:
var sub1TopOffset = -1;
var sub1LeftOffset = 0;


Then your menuCart submenu would be

Code:
with(milonic=new menuname('MenuCart')){
top = "offset=" + sub1TopOffset;
left = "offset=" + sub1LeftOffset;
style=menuStyleCart;


This will put a different subOffset for the MenuCart menu than for the rest, it will shift that submenu up 1px, you can experiment as to what you need, but 1 seemed to work fine.

In your css, in .cartmenuTopOff you would need to add

Code:
BORDER-BOTTOM: #ffffff 1px solid;


and in the .cartmenuTopOn
Code:
BORDER-BOTTOM: #999999 1px solid;


The reason that you need to add that 1px in the off class is that it must match the 1px I added to the on class.

What happens is that when you first mouseover Shopping Cart you will get borders all around, but as soon as the submenu opens, because of the var sub offset, that bottom border will be covered and the full box around main and sub will be the results, the same look you have now.

You could also add a gradient wipe overfilter to the menuStyleCart style which would make the submenu look like it was sliding down from the top one. That will only look like that in IE, of course, in the other browsers that is just ignored and the submenu opens as it does now without the filter.

Code:
overfilter="GradientWipe(WipeStyle=1, size=1.00, motion='Forward', duration=0.5)";


Hope this gives you some help.

Ruth


Poster: nboyad
Dated: Monday October 2 2006 - 17:25:17 BST

Thank you, It worked well.


Poster: kevin3442
Dated: Monday October 2 2006 - 19:17:39 BST

Excellent idea Ruth!