PDA

View Full Version : JsDOMenuBar goes UP off the screen



hknight
03-15-2007, 07:45 PM
1) Script Title: "JsDOMenuBar version 1.11"

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/jsdomenubar/index.htm

3) Describe problem:

If the window size is SHORTER than the height of a sub-menu then the menu goes UP off the window. I want the menu to go down and NEVER to go up.

Please help, thanks!

hknight
03-15-2007, 09:18 PM
I figured this out myself:



/*
Get the top position of the menu bar menu.
*/
function getMainMenuBarMenuTopPos(menuBarObj, menuBarItemObj, menuObj, y) {
return y;
}



/*
Get the top position of the submenu.
*/
function getSubMenuTopPos(menuObj, y, offset) { // Private method
var top = getPropIntVal(menuObj, btw);
var bottom = getPropIntVal(menuObj, bbw);
if (safari) {
return y - top;
}
else {
return y;
}
}