100 point --- onMouseOut - Javascript ??????????
Jeg har \"fået\" en menu der fungerer i frames.Problemet er at dropdownmenuen ikke forsvinder fra siden når jeg tager musen væk fra menupunktet. Hvis der er nogen der kan gennemskue så skriv nu!!!!!!
function onMenuMouseOver(oThis, oSubItem, idx, itm)
{
window.event.cancelBubble = true;
if (oThis == null) return;
var doc = top.document;
var oMenu = doc.Menues[idx];
if (oMenu.ActiveMenuItem != null)
{
top.mnuHide(oMenu.ActiveMenuItem);
oMenu.ActiveMenuItem = null;
oMenu.LastMenuItem.background = \'\';
oMenu.LastMenuItem.style.color = oMenu.Color;
oMenu.LastMenuItem.style.cursor = \'\';
oMenu.LastMenuItem = null;
}
oThis.background = oMenu.imgSelectedBackground.src;
oThis.style.color = oMenu.SelectedColor;
oThis.style.cursor = \'Hand\';
if (oMenu.Items[itm].Class == \'mnuSubItem\') // We are entering a sub menu.
{
var o = findMenu(event.srcElement);
var tbl = top.findObj(\'tbl\' + oSubItem.id);
if (((o.style.posLeft + o.scrollWidth) - 2) + parseInt(tbl.width) >
document.body.scrollWidth)
{
if (((o.style.posLeft - o.scrollWidth) + 2) < 0)
oSubItem.style.posLeft = (o.style.posLeft + o.scrollWidth) - 2;
else
oSubItem.style.posLeft = ((o.style.posLeft - o.scrollWidth) + 2);
}
else
oSubItem.style.posLeft = (o.style.posLeft + o.scrollWidth - 2);
oSubItem.style.posTop = (event.clientY - event.offsetY)-2;
o.style.zIndex=2;
top.mnuShow(oSubItem);
oMenu.ActiveMenuItem = oSubItem;
oMenu.LastMenuItem = oThis;
oSubItem.Owner = oMenu
}
}
function onMenuMouseOut(oThis, idx, itm)
{
event.cancelBubble = true;
if (oThis != null)
{
var doc = top.document;
var oMenu = doc.Menues[idx];
if (oMenu.ActiveMenuItem == null)
{
oThis.background = \'\';
oThis.style.color = oMenu.Color;
oThis.style.cursor = \'\';
}
}
event.cancelBubble = true;
}
function onMenuMouseClick(oThis, idx, itm)
{
event.cancelBubble = true;
if (oThis != null)
{
var doc = top.document;
var oItm = doc.Menues[idx].Items[itm];
if (oItm.Target==\"\")
document.location = oItm.URL;
else
window.open(oItm.URL, oItm.Target);
}
}
function findMenu(srcElement)
{
var oMenu = srcElement;
while ((oMenu != null) && (oMenu.className != \"mnuPopup\"))
{
oMenu = oMenu.parentElement
}
return oMenu;
}
function BEGIN_MENU(aMenu, idx)
{
document.writeln(\'<div id=\"\' + aMenu.id + \'\" class=\"mnuPopup\" align=\"left\" style=\"display: none; position: absolute; left:0; top:0; z-index:0\" >\');
document.write(\'<table id=\"tbl\' + aMenu.id + \'\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"\');
document.write(aMenu.Width + \' style=\"border-style: outset; border-width: 0; cursor: Hand;\" \');
document.write(\'bgcolor=\"\' + aMenu.BackgroundColor + \'\" \');
document.write(\'bordercolor=\"f9f9f9\" \');
if (aMenu.imgBackground)
document.writeln(\'background=\"\' + aMenu.imgBackground.src + \'\" >\');
else
document.writeln(\'>\');
document.writeln(\'<tr>\');
document.writeln(\'<td>\');
}
function END_MENU()
{
document.writeln(\'</td>\');
document.writeln(\'</tr>\');
document.writeln(\'</table>\');
document.writeln(\'</div>\');
}
