V5 - Table bound problem

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

V5 - Table bound problem

Post by topachou »

Hi,

If you look at this sample, you'll see a bug :
http://www.milonic.co.uk/menusample.php?sampleid=9

If you resize the window to 200x200 pixels and move the horizontal scrollbar to the "My milonic" menu, and try to see the sub-menu, you won't see it. That's because it is at 100 pixels at your left, and you can't see it !

This is a relative position issue and I know this menu is still a work in progress, but is there a way that I can fix that.

Thanks for your help.
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

Sorry to bother you but it's not just a bug report.

I need this to work for my own menu.

If anyone knows a fix that could help me, I'll be very grateful.

Thanks.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

It may also be in the way Andy implements this type of menu. John G. came up with a better, easier to implement, and less-buggy way of bounding a menu to a table and having things work better. Try these URLs...
http://milonic.com/forum/viewtopic. ... nu+working
http://milonic.com/forum/viewtopic. ... t=sample+9
http://milonic.com/forum/viewtopic. ... ound+first
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

Well, the urls you posted are not helping. :)

I looked at : http://www.info.fundp.ac.be/~san/test/m ... antest.htm

and : http://www.info.fundp.ac.be/~san/test/m ... ntest2.htm

And they do have the same problem :
If you resize the window at 50x50 (or even better : at minimum size) until you see an horizontal scrollbar, and move the scrollbar to the right, the sub-menus won't display properly. They won't be a their place but (depending on the width of your window) they will be somewhere else.

And it could be very far from where they should be (which is a bit annoying).

I know it's not easy to understand. Just try it here :
http://www.milonic.co.uk/menusample.php?sampleid=9

Thanks you for your help.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

No, I totally see the problem happening. I just thougth that switching around the code in the page may have an effect on the problem. Obviously not. Maybe is it a bug...but then again, if I resize my outlook window or my dreamweaver window to 200x200, its not very useable either. hmm ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Speaking of DW, Dave, did you see the announcement on the new Macromedia MX 2004? There's also a Pro version with a hopped up Flash MX. Should start shipping in a couple weeks.

If you're interested (unless you have a better source) try http://affiliates.macromedia.com/b.asp? ... _home_aff1.
John
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

Right, right.

But if you design a page for a 1024x768 screen and your user has a 800x600, you'd like him to see your page properly with scrollbars.
And it's not the case.

Or : if you design you're page for a 800x600 screen and your user wants to see your site with a 600x600 window (with an horizontal scrollbar) because he browses sites with loads of windows opened everywhere on his screen...

I know it's not a big deal. It could be worse.
But if there is something to fix that, I'll be happy to try it.
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

Well I think I know what is the problem :))

The sub-menus always try to stay in the screen in order to be seen.
Even if they are longer than the window area, they just re-position themselves.

It's a very nice feature. It could be really cool.

But in my case, It can blow my menu apart.

Is it possible to desactivate this feature ?
I'd like my sub-menus to stay in position, even if they go out of the window area.

Thank to help me.
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

After several tests, I was not able to find any quick fix.

But I can tell that it's not because of the "bound to a table cell" feature.
Just check here : http://milonic.co.uk

The top horizontal menu and all Milonic menu have exactly the same problem : the sub-menus don't display correctly when the window is resized and the scrollbar move to the right.

Any ideas ?
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

I know in JS you can grab the window height and width...I am unsure what Andy is doing but if hes not already doing this, he can use the windows current size to determine if he should change where the menu is rendered.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

I think it's more complex thant that :

When the window is centered with no scrollbars, you can use the window width.

But when there are some scrollbars, you can't use the window width any more because the content is not centered. The content is left align.

Something like that :

var width = 564;
var center = true;
var leftMenu = 49;
var leftMenuNotCenter = 98;
var offsetHor = 0;
var offsetVer = 0;

if (!center)
{
if (os() == "win")
offsetHor = 8 + leftMenu;
else
offsetHor = 8 + leftMenu;
}
else
{
page_width = innerWidth;

if (width> page_width)
{
offsetHor = 8 + leftMenuNotCenter;
}
else
{
center_width = (page_width/2);
offsetHor = (center_width - width/2 - 8) + leftMenu;
}
}

But Andy's code is far too complex. I just can't do it myself.

I hope he will fix it.

Thanks anyway for your reply.
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

The problem is that I really need a quick fix.

I tried to mail Andy but I think he could be on holiday.

I can pay for the development. So If anyone can do that quickly, just mail me : gueho_fred@yahoo.fr
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

I dont have the time to do it for you...but in IE, there is a function called document.body.scrollLeft that will give you the amount of scroll to the left. In NN, its pageYOffet. I looked in the mmenudom code and Andy does use these functions quite a few times so I know he is somehow taking into account the scroll. But I am unsure as to how he is doing that with regards to the window's current size....I'd love to investigate it further but dont really have the time, sorry.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
topachou
Advanced
Advanced
Posts: 24
Joined: Wed Aug 06, 2003 10:18 pm

Post by topachou »

Thank you for your help Hergio. :D

Well, I'm waiting for Andy, now... :(
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Andy is back, and he's sifting through 800+ e-mails after his short trip :!: He'll get here, but have a little patience.
John
Post Reply