Menu moved to top...

Dear all,

I have a dynamic menu that´s sometimes too long to fit the screen on bottom.

The menu js in that case moves the menu to top but unfortunately it moves the upper items under the header and adressline of the browser (tested with FF 5, 6 and 7 and IE 8 and 9) so that the upper items are unselectable.

Ok, I can set the setOverflowHeight but how to calculate the max. possible items and how to set the top coordinate for the upper beginning of the menu?

Greetings

Hello,

we have added support for “auto” argument in the setOverflowHeight method. Now you may pass “auto” instead of fixed value. In this case, the scrollers will automatically be set .

I have attached the sample (dhtmlxmenu.js and dhtmlxmenu_ext.js were modified)
menu.zip (39.9 KB)

Hi,

great, but it doesn´t solve my problem completly.

Do you have any idea how I could change the the setOverflowHeight if the user resize the browser window??

And, by the way, if I call renderAsContextMenu (true) (also with your sample) I always good a JavaScript error “polygon not defined”.

Greetings

Hi,

doesn’t the sample work ? Locally we did not get error message. The sample works great.

Hi,

basically the sample works. I need to remove the call “renderAsContextMenu” otherwise I got the message that “var polygon is not defined” (tested in FF 7).

If I set the setVisibleArea without the call renderAsContextMenu it works. So I don´t know what happens if I add the call “renderAsContextMenu” and I don´t know why I need it.

The second question is: if I set the visible area i.e. to top 100 and bottom 800 and the user resize the browser window so that bottom 800 is outside the window how can I react to set the height of the menu on the fly to a value to become scrollers to the menu. Is this possible??