Hvis man trykker på guestbook knappen skal der komme en menu op, hvilket der også gør, men hvis man vælger sign og holder musetasten nede hopper menuen. Hvordan kan det være?
De fleste virksomheder har efterhånden bevist, at AI virker.
Pilotprojekter leverer resultater. Medarbejdere bruger generative AI-værktøjer. Nye use cases dukker op på tværs af organisationen.
/** * Menu 990702 * by gary smith, July 1997 * Copyright (c) 1997-1999 Netscape Communications Corp. * * Menu 020903 * by doron rosenberg, September 2002 * Copyright (c) 1997-2002 Netscape Communications Corp. * * Netscape grants you a royalty free license to use or modify this * software provided that this copyright notice appears on all copies. * This software is provided "AS IS," without a warranty of any kind. */
function onMenuItemOver(e, l, a) { l = l || this; a = a || window.ActiveMenuItem; if (document.layers) { if (a) { a.document.bgColor = a.saveColor; if (a.hilite) a.hilite.visibility = "hidden"; if (a.childMenu) a.document.layers[1].document.images[0].src = a.icon; } else { a = new Object(); } if (this.mouseover && this.id != a.id) { if (this.mouseover.length > 4) { var ext = this.mouseover.substring(this.mouseover.length-4); if (ext == ".gif" || ext == ".jpg") { this.document.layers[1].document.images[0].src = this.mouseover; } else { eval("" + this.mouseover); } } } if (l.hilite) { l.document.bgColor = l.menuHiliteBgColor; l.zIndex = 1; l.hilite.visibility = "inherit"; l.hilite.zIndex = 2; l.document.layers[1].zIndex = 1; l.focusItem.zIndex = this.zIndex +2; } l.focusItem.top = this.top; l.Menu.hideChildMenu(l); } else if (document.all && l.style && l.Menu) { document.onmousedown=l.Menu.onMenuItemDown; if (a) { a.style.backgroundColor = a.saveColor; if (a.hilite) a.hilite.style.visibility = "hidden"; } else { a = new Object(); } if (l.mouseover && l.id != a.id) { if (l.mouseover.length > 4) { var ext = l.mouseover.substring(l.mouseover.length-4); if (ext == ".gif" || ext == ".jpg") { l.document.images[l.id + "Img"].src = l.mouseover; } else { eval("" + l.mouseover); } } } if (l.isSeparator) return; l.style.backgroundColor = l.menuHiliteBgColor; if (l.hilite) { l.style.backgroundColor = l.menuHiliteBgColor; l.hilite.style.visibility = "inherit"; } l.focusItem.style.pixelTop = l.style.pixelTop; l.focusItem.style.zIndex = l.zIndex +1; l.zIndex = 1; l.Menu.hideChildMenu(l); } else if (document.getElementById){ document.onmousedown=l.Menu.onMenuItemDown; if (a) { a.style.backgroundColor = a.saveColor; if (a.hilite) a.hilite.style.visibility = "hidden"; } else { a = new Object(); } if (this.mouseover && this.id != a.id) { if (this.mouseover.length > 4) { var ext = this.mouseover.substring(this.mouseover.length-4); if (ext == ".gif" || ext == ".jpg") { document.images[l.id + "Img"].src = this.mouseover; } else { eval("" + this.mouseover); } } } if (l.hilite) { l.style.backgroundColor = l.menuHiliteBgColor; l.hilite.style.visibility = "inherit"; } l.focusItem.style.top = l.style.top; l.focusItem.style.zIndex = l.zIndex +1; l.zIndex = 1; l.Menu.hideChildMenu(l); } window.ActiveMenuItem = l; }
function onMenuItemOut(e, l, a) { if (!document.all && !document.layers && e.currentTarget.nodeType == 1 && e.currentTarget.tagName == 'DIV') return true; l = l || this; a = a || window.ActiveMenuItem; if (l.id.indexOf("focusItem")) { if (a && l.top) { l.top = -30; if (a.mouseout && a.id != l.id) { if (a.mouseout.length > 4) { var ext = a.mouseout.substring(a.mouseout.length-4); if (ext == ".gif" || ext == ".jpg") { a.document.layers[1].document.images[0].src = a.mouseout; } else { eval("" + a.mouseout); } } } } else if (a && l.style) { document.onmousedown=null; if(window.event) window.event.cancelBubble=true; else e.cancelBubble=true; if (l.mouseout) { if (l.mouseout.length > 4) { var ext = l.mouseout.substring(l.mouseout.length-4); if (ext == ".gif" || ext == ".jpg") { l.document.images[l.id + "Img"].src = l.mouseout; } else { eval("" + l.mouseout); } } } } } }
function onMenuItemAction(e, l) { l = window.ActiveMenuItem; if (!l) return; // if (!ActiveMenu.Menu.disableHide) hideActiveMenus(ActiveMenu.menuLayer); if (l.action) { eval("" + l.action); } }
function showMenu(menu, x, y, child) { if (!window.wroteMenu) return; if (document.layers) { if (menu) { var l = menu.menuLayer || menu; if (typeof(menu) == "string") { for (var n=0; n < menuContainers.length; n++) { l = menuContainers[n].menus[menu]; for (var i=0; i<menuContainers[n].menus.length; i++) { if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer; if (l) break; } } if (!l) return; } l.Menu.container.document.bgColor = null; l.left = 1; l.top = 1; hideActiveMenus(l); if (this.visibility) l = this; window.ActiveMenu = l; window.releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP); setTimeout('if(window.ActiveMenu)window.ActiveMenu.Menu.setMouseTracker();', 300); } else { var l = child; } if (!l) return; for (var i=0; i<l.layers.length; i++) { if (!l.layers[i].isHilite) l.layers[i].visibility = "inherit"; if (l.layers[i].document.layers.length > 0) showMenu(null, "relative", "relative", l.layers[i]); } if (l.parentLayer) { if (x != "relative") l.parentLayer.left = x || window.pageX || 0; if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth); if (y != "relative") l.parentLayer.top = y || window.pageY || 0; if (l.parentLayer.isContainer) { l.Menu.xOffset = window.pageXOffset; l.Menu.yOffset = window.pageYOffset; l.parentLayer.clip.width = window.ActiveMenu.clip.width +2; l.parentLayer.clip.height = window.ActiveMenu.clip.height +2; if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor; } } l.visibility = "inherit"; if (l.Menu) l.Menu.container.visibility = "inherit"; } else if (document.all) { var l = menu.menuLayer || menu; hideActiveMenus(l); if (typeof(menu) == "string") { l = document.all[menu]; for (var n=0; n < menuContainers.length; n++) { l = menuContainers[n].menus[menu]; for (var i=0; i<menuContainers[n].menus.length; i++) { if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer; if (l) break; } } } window.ActiveMenu = l; l.style.visibility = "inherit"; if (x != "relative") l.style.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0; if (y != "relative") l.style.pixelTop = y || (window.pageY + document.body.scrollTop) || 0; l.Menu.xOffset = document.body.scrollLeft; l.Menu.yOffset = document.body.scrollTop; } else if (document.getElementById) { var l = menu.menuLayer || menu; hideActiveMenus(l); if (typeof(menu) == "string") { l = document.getElementById(menu); for (var n=0; n < menuContainers.length; n++) { l = menuContainers[n].menus[menu]; for (var i=0; i<menuContainers[n].menus.length; i++) { if (menu == menuContainers[n].menus[i].label) l = menuContainers[n].menus[i].menuLayer; if (l) break; } } } window.ActiveMenu = l; l.style.visibility = "inherit"; if (x != "relative") l.style.left = x || (window.pageX) || 0; if (y != "relative") l.style.top = y || (window.pageY) || 0; l.Menu.xOffset = document.body.scrollLeft; l.Menu.yOffset = document.body.scrollTop; }
if (menu) { window.activeMenus[window.activeMenus.length] = l; } }
function hideMenu(e) { if (!document.all && e.currentTarget && e.currentTarget.tagName && e.currentTarget.tagName == 'DIV') return true;
var l = e || window.ActiveMenu; if (!l) return true; if (l.menuLayer) { l = l.menuLayer; } else if (this.visibility) { l = this; } if (l.menuLayer) { l = l.menuLayer; } var a = window.ActiveMenuItem; document.saveMousemove = document.onmousemove; document.onmousemove = mouseTracker; if (a && document.layers) { a.document.bgColor = a.saveColor; a.focusItem.top = -30; if (a.hilite) a.hilite.visibility = "hidden"; if (a.childMenu) a.document.layers[1].document.images[0].src = a.icon; if (mDrag.oldX <= e.pageX+3 && mDrag.oldX >= e.pageX-3 && mDrag.oldY <= e.pageY+3 && mDrag.oldY >= e.pageY-3) { if (a.action && window.ActiveMenu) setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2); } else if (document.saveMousemove == mDrag.doMenuDrag) { if (window.ActiveMenu) return true; } } else if (window.ActiveMenu && document.all) { document.onmousedown=null; if (a) { a.style.backgroundColor = a.saveColor; if (a.hilite) a.hilite.style.visibility = "hidden"; } if (document.saveMousemove == mDrag.doMenuDrag) { return true; } } else if (window.ActiveMenu && document.getElementById) { document.onmousedown=null; if (a) { a.style.backgroundColor = a.saveColor; if (a.hilite) a.hilite.style.visibility = "hidden"; } if (document.saveMousemove == mDrag.doMenuDrag) { return true; } } if (window.ActiveMenu) { if (window.ActiveMenu.Menu) { if (window.ActiveMenu.Menu.disableHide) return true; e = window.event || e; if (!window.ActiveMenu.Menu.enableHideOnMouseOut && e.type == "mouseout") return true; } } hideActiveMenus(l); return true; }
if (!l.childMenu.disableHide) window.activeMenus[window.activeMenus.length] = l.childMenu; } }
function hideActiveMenus(l) { if (!window.activeMenus) return; for (var i=0; i < window.activeMenus.length; i++) { if (!activeMenus[i]) return; if (document.layers && activeMenus[i].visibility && activeMenus[i].Menu) { activeMenus[i].visibility = "hidden"; activeMenus[i].Menu.container.visibility = "hidden"; activeMenus[i].Menu.container.clip.left = 0; } else if (activeMenus[i].style) { activeMenus[i].style.visibility = "hidden"; } } document.onmousemove = mouseTracker; window.activeMenus.length = 0; }
function mouseTracker(e) { e = e || window.Event || window.event; window.pageX = e.pageX || e.clientX; window.pageY = e.pageY || e.clientY; }
function setMouseTracker() { if (document.captureEvents) { document.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); } document.onmousemove = this.mouseTracker; document.onmouseup = this.hideMenu; }
function setMenuTracker(menu) { if (!window.menuTrackers) window.menuTrackers = new Array(); menuTrackers[menuTrackers.length] = menu; window.menuTrackerID = setInterval('menuTracker()',10); }
function menuTracker() { for (var i=0; i < menuTrackers.length; i++) { if (!isNaN(menuTrackers[i].xOffset) && document.layers) { var off = parseInt((menuTrackers[i].xOffset - window.pageXOffset) / 10); if (isNaN(off)) off = 0; if (off < 0) { menuTrackers[i].container.left += -off; menuTrackers[i].xOffset += -off; } else if (off > 0) { menuTrackers[i].container.left += -off; menuTrackers[i].xOffset += -off; } } if (!isNaN(menuTrackers[i].yOffset) && document.layers) { var off = parseInt((menuTrackers[i].yOffset - window.pageYOffset) / 10); if (isNaN(off)) off = 0; if (off < 0) { menuTrackers[i].container.top += -off; menuTrackers[i].yOffset += -off; } else if (off > 0) { menuTrackers[i].container.top += -off; menuTrackers[i].yOffset += -off; } } if (!isNaN(menuTrackers[i].xOffset) && document.body) { var off = parseInt((menuTrackers[i].xOffset - document.body.scrollLeft) / 10); if (isNaN(off)) off = 0; if (off < 0) { menuTrackers[i].menuLayer.style.pixelLeft += -off; menuTrackers[i].xOffset += -off; } else if (off > 0) { menuTrackers[i].menuLayer.style.pixelLeft += -off; menuTrackers[i].xOffset += -off; } } if (!isNaN(menuTrackers[i].yOffset) && document.body) { var off = parseInt((menuTrackers[i].yOffset - document.body.scrollTop) / 10); if (isNaN(off)) off = 0; if (off < 0) { menuTrackers[i].menuLayer.style.pixelTop += -off; menuTrackers[i].yOffset += -off; } else if (off > 0) { menuTrackers[i].menuLayer.style.pixelTop += -off; menuTrackers[i].yOffset += -off; } } } }
function onMenuItemDown(e, l) { l = l || window.ActiveMenuItem || this; if (!l.Menu) { } else { if (document.layers) { mDrag.dragLayer = l.Menu.container; mDrag.startMenuDrag(e); document.captureEvents(Event.MOUSEMOVE); } else if (document.all) { mDrag.dragLayer = l.Menu.container.style; mDrag.startMenuDrag(e); window.event.cancelBubble=true; } else if (document.getElementById) { mDrag.dragLayer = l.Menu.container.style; mDrag.startMenuDrag(e); document.captureEvents(Event.MOUSEMOVE); } var x = !document.all? e.pageX : window.event.clientX; var y = !document.all? e.pageY : window.event.clientY;
} }
function startMenuDrag(e) { if (document.layers) { if (e.which > 1) { if (window.ActiveMenu) ActiveMenu.Menu.container.visibility = "hidden"; window.ActiveMenu = null; return true; } document.captureEvents(Event.MOUSEMOVE); var x = e.pageX; var y = e.pageY; } else if (document.all) { var x = window.event.clientX; var y = window.event.clientY; } else if (document.getElementById) { if (e.which > 1) { if (window.ActiveMenu) ActiveMenu.Menu.container.visibility = "hidden"; window.ActiveMenu = null; return true; } document.captureEvents(Event.MOUSEMOVE); var x = e.pageX; var y = e.pageY; }
måske skulle jeg bare finde noget andet at bruge :-) Det her er vist alligevel lidt gammelt. Jeg har fundet noget som hedder coolmenus. Det ser ud som om det er til at finde ud af :-)
Synes godt om
Slettet bruger
19. januar 2003 - 11:52#14
Coolmenus er den bedste menu af sin slags på nettet. Så vælg den, hvis du har mod på at sætte den op!
P.S. Hvorfor tror du, jeg sagde, at du skulle lægge js-filen ud som en txt-fil? Så spørgsmålet ikke blev 30 km langt! :)
Hvordan skal jeg så gøre det (vil jo gerne vide det til en anden gang)
Synes godt om
Slettet bruger
20. januar 2003 - 14:54#20
Du åbner filen "menu.js" i Notepad (hvis den ser meget underlig ud, så brug WordPad). Vælg Gem som >> "menu.txt". Upload denne fil. Så kan filen nemlig læses direkte i Internet Explorer, uden man behøver at downloade den til sin harddisk (eller temp-folder).
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.