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

V5 - Table bound problem


Poster: topachou
Dated: Wednesday August 27 2003 - 9:51:48 BST

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.


Poster: topachou
Dated: Wednesday August 27 2003 - 14:32:58 BST

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.


Poster: Hergio
Dated: Wednesday August 27 2003 - 14:34:02 BST

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://www.milonic.com/forum/viewtopic.php?t=2367&highlight=first+submenu+working
http://www.milonic.com/forum/viewtopic.php?t=2325&highlight=sample+9
http://www.milonic.com/forum/viewtopic.php?t=2367#8057&highlight=table+bound+first


Poster: topachou
Dated: Wednesday August 27 2003 - 14:58:19 BST

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

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

and : http://www.info.fundp.ac.be/~san/test/menu/test/santest2.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.


Poster: Hergio
Dated: Wednesday August 27 2003 - 15:07:04 BST

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 ;)


Poster: John
Dated: Wednesday August 27 2003 - 15:16:34 BST

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?id=1929&p=go/dr_home_aff1.


Poster: topachou
Dated: Wednesday August 27 2003 - 15:23:40 BST

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.


Poster: topachou
Dated: Wednesday August 27 2003 - 17:43:26 BST

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.


Poster: topachou
Dated: Thursday August 28 2003 - 0:59:58 BST

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 ?


Poster: Hergio
Dated: Thursday August 28 2003 - 4:21:41 BST

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.


Poster: topachou
Dated: Thursday August 28 2003 - 9:08:03 BST

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.


Poster: topachou
Dated: Thursday August 28 2003 - 11:01:37 BST

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 __at__ yahoo.fr


Poster: Hergio
Dated: Thursday August 28 2003 - 13:05:31 BST

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.


Poster: topachou
Dated: Thursday August 28 2003 - 13:31:27 BST

Thank you for your help Hergio. :D

Well, I'm waiting for Andy, now... :(


Poster: John
Dated: Thursday August 28 2003 - 15:12:26 BST

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