Supportnet Computer
Planet of Tech

Supportnet / Forum / Webseiten/HTML

Dyn Menueleisten





Frage

Hallo, ich möchte in meine HP dynam. Menueleisten einbauen. Ich habe das folgende script an geschau, bringe es aber nicht zum laufen. Danke für die Hilfe. <script type="text/javascript"> <!-- function Menue() { if(DOM) { if(MS) getElem("id","Nav",null).style.top = document.body.scrollTop + 50; else getElem("id","Nav",null).style.top = window.pageYOffset + 50; } if(DOM || MS) { if (!DOM) getElem("id","Nav",null).style.top = document.body.scrollTop + 50; if (OP) getElem("id","NavLinks",null).style.pixelTop = NavLinksPos; getElem("id","Nav",null).style.visibility = "visible"; } else if(NS) { getElem("id","Nav",null).visibility = "show"; getElem("id","Nav",null).top = window.pageYOffset + 50; } } function noMenue() { if(DOM || MS) getElem("id","Nav",null).style.visibility = "hidden"; if(NS) getElem("id","Nav",null).visibility = "hide"; } function handleMove(ev) { if(!MS) { Event = ev; if(Event.screenX < 270) Menue(); else if(Event.screenX > 420) noMenue(); } } function MShandleMove() { if(MS) { if(window.event.clientX < 270) Menue(); else if(window.event.clientX > 420) noMenue(); } } function Event_init() { if(DOM && !MS && !OP) { getElem("tagname","body",0).addEventListener("mousemove", handleMove, true); } if(NS) { document.captureEvents(Event.MOUSEMOVE); document.onmousemove=handleMove; } if (DOM && OP) { document.onmousemove=handleMove; NavLinksPos=42; //Position des Bereiches NavLinks getElem("id","NavLinks",null).style.pixelTop=NavLinksPos; } if (MS) getElem("tagname","body",0).onmousemove=MShandleMove; } //--> </script> <style type="text/css"> <!-- body { margin-left:50px; margin-top:20px; margin-right:50px; } #Nav { position:absolute; top:50px; left:0px; padding:0px; visibility:hidden; margin:0px; } #NavLinks { position:absolute; top:42px; left:42px; padding:0px; } a.nav:link { color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } a.nav:visited { color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } a.nav:hover { color:#FFFFFF; background-color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } a.nav:active { color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } --> </style> </head> <body onLoad="Event_init()" background="navigation_back.gif" bgcolor="#FFFFFF"> <div id="Nav"> <img src="navigation.gif" width="250" height="450" border="0" alt=""> <div id="NavLinks"> <style type="text/css"> <!-- a.nav:link { color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } a.nav:visited { color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } a.nav:hover { color:#FFFFFF; background-color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } a.nav:active { color:#000080; font-family:Tahoma,sans-serif; font-weight:bold; font-size:10pt; text-decoration:none; } -->

Antwort 1 von abschweb

Hallo Herb21,

da wo du den Code her hast muss noch mehr sein.
Es werden hier weder DOM, MS, NS noch die Funktion
getElem () definiert. Die findest du vermutlich in einem weiteren eingebundenen Script der Originaldatei. Es ließen sich zwar all diese Dinge rekonstruieren, aber schau erst mal nach.

Gruß
Manfred