Ergebnis 1 bis 4 von 4

Thema: Script: Menü

  1. #1
    Meister(in)
    Registriert seit
    01.02.2004
    Ort
    Hannover
    Beiträge
    467
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard Script: Menü

    Code:
    <!-- 1&#58;Put this stylesheet in to the head of your page.
    This sets the colour of the links in the drop down
    menus. Does not effect other links! -->
    
    <style type="text/css">
    <!--
    a.x&#58;link, a.x&#58;visited, a.x&#58;active&#123;color&#58;#ffffff;text-decoration&#58;none&#125;
    //-->
    </style>
    
    
    
    
    
    <body marginheight="50" topmargin="50">
    
    
    
    
    <script language="JavaScript">
    <!-- Cross Browser NavBar2 &#40;Not NS6&#41; kurt.grigg@virgin.net
    if &#40;document.layers||document.all&#41;&#123;
    
    //Do not alter this first section, go straight to "Edit the appearance"
    
    MenuTitles=new Array&#40;&#41;
    SubMenuLinks=new Array&#40;&#41;
    function Rtrn&#40;c&#41;&#123;
    if &#40;document.layers&#41; c.bgColor=HighLight;
    if &#40;document.all&#41; c.style.background=HighLight;
    &#125;
    function HghLght&#40;c&#41;&#123;
    if &#40;document.layers&#41; c.bgColor=MenuBgColor;
    if &#40;document.all&#41; c.style.background=MenuBgColor;
    &#125;
    OpenLayer=&#40;document.layers&#41;?"
    <layer width=100% onMouseOver='HghLght&#40;this&#41;'; onMouseOut='Rtrn&#40;this&#41;'><center>"&#58;"<span style='width&#58;100%' onMouseOver='HghLght&#40;this&#41;'; onMouseOut='Rtrn&#40;this&#41;'>";
    CloseLayer=&#40;document.layers&#41;?'</center></layer>'&#58;'</span>';
    
    /*************** Edit the appearance here ***************/
    
    MenuWidth=120;
    MenuFont='Verdana,Arial';
    MenuFontSize=2; //1 to 7 only!
    SubMenuFontSize=2; //1 to 7 only!
    
    MenuFontColor='#ffffff';
    MenuBgColor='005eff';
    HighLight='0598ff';
    Separater=2;
    
    /********* Menu Amount and titles here. Add or delete as needed *********/
    
    MenuTitles&#91;0&#93;='Menu 1';
    MenuTitles&#91;1&#93;='Menu 2';
    MenuTitles&#91;2&#93;='Menu 3';
    MenuTitles&#91;3&#93;='Menu 4';
    MenuTitles&#91;4&#93;='Menu 5';
    
    
    /**************************************************************************
    The sub menu titles are the drop down links which appear when the corresponding
    main menu titles/headers are moused over. eg&#58; When MenuTitles&#91;0&#93; is moused over,
    all the links in SubMenuLinks&#91;0&#93; will appear etc. You can have any number of links
    in the sub menus. !!Make sure your links are in the same format as shown!!.
    
    Do not alter  +OpenLayer+"  and  "+CloseLayer  at the beginnings and ends!!
    
    Here's how you would fill them with your links. Example&#58;
    +OpenLayer+"Search with Google"+CloseLayer
    **************************************************************************/
    
    SubMenuLinks&#91;0&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;1&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;2&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;3&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;4&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    /****************** You don't need to alter anything past this point ******************/
    MenuAmount=MenuTitles.length;
    MenWidth=0;
    PageWidth=0;
    IniPos=0;
    Spacer=0;
    aIniPos=0;
    aSpacer=0;
    function Pos&#40;&#41;&#123;
    MenWidth=&#40;MenuWidth+Separater&#41;*MenuAmount;
    PageWidth=&#40;document.layers&#41;?window.innerWidth/2&#58;document.body.clientWidth/2;
    IniPos= PageWidth-MenuWidth-Separater-MenWidth/2;
    Spacer=MenuWidth+Separater;
    aIniPos= PageWidth-MenuWidth-Separater-MenWidth/2;
    aSpacer=MenuWidth+Separater;
    if &#40;MenWidth > PageWidth*2&#41;&#123;
    IniPos=-MenuWidth-Separater;
    aIniPos=-MenuWidth-Separater;
    &#125;
    &#125;
    Pos&#40;&#41;;
    if &#40;document.layers&#41;&#123;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<layer name='submenu"+i+"' top=0 left="+&#40;aIniPos+=aSpacer&#41;+" "
    +" width="+MenuWidth+" bgcolor="+HighLight+" visibility=hide"
    +" onMouseOver='this.visibility=\"show\"; var cd=this.id.length-1; var ab=this.id.charAt&#40;cd&#41;; H&#40;ab&#41;' "
    +" onMouseOut='this.visibility=\"hide\"; var ef=this.id.length-1; var gh=this.id.charAt&#40;ef&#41;; B&#40;gh&#41;'>"
    +"<center><font face="+MenuFont+" size="+SubMenuFontSize+">"
    +"&
    "+SubMenuLinks&#91;i&#93;+"
    </font></center></layer>"&#41;;
    &#125;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<layer name='nsmenu"+i+"' top=0 left="+&#40;IniPos+=Spacer&#41;+" height=0 "
    +"width="+MenuWidth+" bgcolor="+MenuBgColor+" "
    +"onMouseOver=\"this.bgColor=HighLight; var e=this.id.length-1; var d=this.id.charAt&#40;e&#41;; On&#40;d&#41;\" "
    +"onMouseOut=\"this.bgColor=MenuBgColor; var e=this.id.length-1; var d=this.id.charAt&#40;e&#41;; Off&#40;d&#41;\">"
    +"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
    +MenuTitles&#91;i&#93;+"</font></center></layer>"&#41;;
    &#125;
    function On&#40;x&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'submenu'+x&#93;.visibility='show';
     &#125;
    &#125;
    function Off&#40;x&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'submenu'+x&#93;.visibility='hide';
     &#125;
    &#125;
    function B&#40;y&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'nsmenu'+y&#93;.bgColor=MenuBgColor;
     &#125;
    &#125;
    function H&#40;y&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'nsmenu'+y&#93;.bgColor=HighLight;
     &#125;
    &#125;
    &#125;
    if &#40;document.all&#41;&#123;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<div id='sub"+i+"' style='position&#58;absolute;"
    +"top&#58;0px;"
    +"left&#58;"+&#40;aIniPos+=aSpacer&#41;+";"
    +"height&#58;0px;"
    +"width&#58;"+MenuWidth+";"
    +"background&#58;"+HighLight+";"
    +"visibility&#58;hidden'"
    +" onMouseOver='this.style.visibility=\"visible\";"
    +" document.all&#91;\"headers"+i+"\"&#93;.style.background=HighLight';"
    +" onMouseOut='this.style.visibility=\"hidden\";"
    +" document.all&#91;\"headers"+i+"\"&#93;.style.background=MenuBgColor'>"
    +"<center><font face="+MenuFont+" size="+SubMenuFontSize+">"
    +"&
    &
    "+SubMenuLinks&#91;i&#93;+"</font></center></div>"&#41;;
    &#125;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<div id='headers"+i+"' style='position&#58;absolute;"
    +"top&#58;0px;"
    +"left&#58;"+&#40;IniPos+=Spacer&#41;+";"
    +"height&#58;0px;"
    +"width&#58;"+MenuWidth+";"
    +"background&#58;"+MenuBgColor+";"
    +"cursor&#58;nw-resize;"
    +"padding&#58;0px'"
    +" onMouseOver='document.all&#91;\"sub"+i+"\"&#93;.style.visibility=\"visible\";"
    +" this.style.background=HighLight'"
    +" onMouseOut='document.all&#91;\"sub"+i+"\"&#93;.style.visibility=\"hidden\";"
    +" this.style.background=MenuBgColor'>"
    +"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
    +MenuTitles&#91;i&#93;+"</font></center></div>"&#41;;
    &#125;
    &#125;
    function Scroll&#40;&#41;&#123;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    if &#40;document.layers&#41;&#123;
    document.layers&#91;'nsmenu'+i&#93;.top=window.pageYOffset;
    document.layers&#91;'submenu'+i&#93;.top=window.pageYOffset;
    &#125;
    if &#40;document.all&#41;&#123;
    document.all&#91;'headers'+i&#93;.style.top=0+document.body.scrollTop;
    document.all&#91;'sub'+i&#93;.style.top=0+document.body.scrollTop;
    &#125;
    &#125;
    setTimeout&#40;'Scroll&#40;&#41;',150&#41;
    &#125;
    Scroll&#40;&#41;;
    window.onresize=new Function&#40;"window.location.reload&#40;&#41;"&#41;;
    &#125;
    //-->
    </script>
    Achtung: Dies ist ein alter Thread im HTML und Webmaster Forum
    Diese Diskussion ist älter als 90 Tage. Die darin enthaltenen Informationen sind möglicherweise nicht mehr aktuell. Erstelle bitte zu deiner Frage ein neues Thema im Forum !!!!!

  2. #2
    Magicco
    Gast

    Standard Re: Script: Menü

    Hi,
    ich habe dieses Skript auf meiner Seite eingebaut, welche wiefolgt aufgebaut ist:

    ------------oben----------------------
    ###Bilder
    ###Navigation
    ----------Framerahmen--------------
    main
    -----------unten-----------------------

    Wenn ich die Seite jetzt im Browser (ie6, opera) ist das popup nur bis zum Framerahmen sichtbar, der Rest wird "abgeschnitten" Wie kann ich das ändern, dass das Popup über den Framerand hinaus angezeigt wird?
    Im Netscape wird das menu gar nicht dargestellt! Lässt sich das ändern?


    Zitat Zitat von PatrickPaulsen
    Code:
    <!-- 1&#58;Put this stylesheet in to the head of your page.
    This sets the colour of the links in the drop down
    menus. Does not effect other links! -->
    
    <style type="text/css">
    <!--
    a.x&#58;link, a.x&#58;visited, a.x&#58;active&#123;color&#58;#ffffff;text-decoration&#58;none&#125;
    //-->
    </style>
    
    
    
    
    
    <body marginheight="50" topmargin="50">
    
    
    
    
    <script language="JavaScript">
    <!-- Cross Browser NavBar2 &#40;Not NS6&#41; kurt.grigg@virgin.net
    if &#40;document.layers||document.all&#41;&#123;
    
    //Do not alter this first section, go straight to "Edit the appearance"
    
    MenuTitles=new Array&#40;&#41;
    SubMenuLinks=new Array&#40;&#41;
    function Rtrn&#40;c&#41;&#123;
    if &#40;document.layers&#41; c.bgColor=HighLight;
    if &#40;document.all&#41; c.style.background=HighLight;
    &#125;
    function HghLght&#40;c&#41;&#123;
    if &#40;document.layers&#41; c.bgColor=MenuBgColor;
    if &#40;document.all&#41; c.style.background=MenuBgColor;
    &#125;
    OpenLayer=&#40;document.layers&#41;?"
    <layer width=100% onMouseOver='HghLght&#40;this&#41;'; onMouseOut='Rtrn&#40;this&#41;'><center>"&#58;"<span style='width&#58;100%' onMouseOver='HghLght&#40;this&#41;'; onMouseOut='Rtrn&#40;this&#41;'>";
    CloseLayer=&#40;document.layers&#41;?'</center></layer>'&#58;'</span>';
    
    /*************** Edit the appearance here ***************/
    
    MenuWidth=120;
    MenuFont='Verdana,Arial';
    MenuFontSize=2; //1 to 7 only!
    SubMenuFontSize=2; //1 to 7 only!
    
    MenuFontColor='#ffffff';
    MenuBgColor='005eff';
    HighLight='0598ff';
    Separater=2;
    
    /********* Menu Amount and titles here. Add or delete as needed *********/
    
    MenuTitles&#91;0&#93;='Menu 1';
    MenuTitles&#91;1&#93;='Menu 2';
    MenuTitles&#91;2&#93;='Menu 3';
    MenuTitles&#91;3&#93;='Menu 4';
    MenuTitles&#91;4&#93;='Menu 5';
    
    
    /**************************************************************************
    The sub menu titles are the drop down links which appear when the corresponding
    main menu titles/headers are moused over. eg&#58; When MenuTitles&#91;0&#93; is moused over,
    all the links in SubMenuLinks&#91;0&#93; will appear etc. You can have any number of links
    in the sub menus. !!Make sure your links are in the same format as shown!!.
    
    Do not alter  +OpenLayer+"  and  "+CloseLayer  at the beginnings and ends!!
    
    Here's how you would fill them with your links. Example&#58;
    +OpenLayer+"Search with Google"+CloseLayer
    **************************************************************************/
    
    SubMenuLinks&#91;0&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;1&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;2&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;3&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    SubMenuLinks&#91;4&#93;=""
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    +OpenLayer+"Your Links"+CloseLayer
    
    /****************** You don't need to alter anything past this point ******************/
    MenuAmount=MenuTitles.length;
    MenWidth=0;
    PageWidth=0;
    IniPos=0;
    Spacer=0;
    aIniPos=0;
    aSpacer=0;
    function Pos&#40;&#41;&#123;
    MenWidth=&#40;MenuWidth+Separater&#41;*MenuAmount;
    PageWidth=&#40;document.layers&#41;?window.innerWidth/2&#58;document.body.clientWidth/2;
    IniPos= PageWidth-MenuWidth-Separater-MenWidth/2;
    Spacer=MenuWidth+Separater;
    aIniPos= PageWidth-MenuWidth-Separater-MenWidth/2;
    aSpacer=MenuWidth+Separater;
    if &#40;MenWidth > PageWidth*2&#41;&#123;
    IniPos=-MenuWidth-Separater;
    aIniPos=-MenuWidth-Separater;
    &#125;
    &#125;
    Pos&#40;&#41;;
    if &#40;document.layers&#41;&#123;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<layer name='submenu"+i+"' top=0 left="+&#40;aIniPos+=aSpacer&#41;+" "
    +" width="+MenuWidth+" bgcolor="+HighLight+" visibility=hide"
    +" onMouseOver='this.visibility=\"show\"; var cd=this.id.length-1; var ab=this.id.charAt&#40;cd&#41;; H&#40;ab&#41;' "
    +" onMouseOut='this.visibility=\"hide\"; var ef=this.id.length-1; var gh=this.id.charAt&#40;ef&#41;; B&#40;gh&#41;'>"
    +"<center><font face="+MenuFont+" size="+SubMenuFontSize+">"
    +"&
    "+SubMenuLinks&#91;i&#93;+"
    </font></center></layer>"&#41;;
    &#125;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<layer name='nsmenu"+i+"' top=0 left="+&#40;IniPos+=Spacer&#41;+" height=0 "
    +"width="+MenuWidth+" bgcolor="+MenuBgColor+" "
    +"onMouseOver=\"this.bgColor=HighLight; var e=this.id.length-1; var d=this.id.charAt&#40;e&#41;; On&#40;d&#41;\" "
    +"onMouseOut=\"this.bgColor=MenuBgColor; var e=this.id.length-1; var d=this.id.charAt&#40;e&#41;; Off&#40;d&#41;\">"
    +"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
    +MenuTitles&#91;i&#93;+"</font></center></layer>"&#41;;
    &#125;
    function On&#40;x&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'submenu'+x&#93;.visibility='show';
     &#125;
    &#125;
    function Off&#40;x&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'submenu'+x&#93;.visibility='hide';
     &#125;
    &#125;
    function B&#40;y&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'nsmenu'+y&#93;.bgColor=MenuBgColor;
     &#125;
    &#125;
    function H&#40;y&#41;&#123;
     for &#40;i=0; i < MenuAmount; i++&#41;&#123;
     document.layers&#91;'nsmenu'+y&#93;.bgColor=HighLight;
     &#125;
    &#125;
    &#125;
    if &#40;document.all&#41;&#123;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<div id='sub"+i+"' style='position&#58;absolute;"
    +"top&#58;0px;"
    +"left&#58;"+&#40;aIniPos+=aSpacer&#41;+";"
    +"height&#58;0px;"
    +"width&#58;"+MenuWidth+";"
    +"background&#58;"+HighLight+";"
    +"visibility&#58;hidden'"
    +" onMouseOver='this.style.visibility=\"visible\";"
    +" document.all&#91;\"headers"+i+"\"&#93;.style.background=HighLight';"
    +" onMouseOut='this.style.visibility=\"hidden\";"
    +" document.all&#91;\"headers"+i+"\"&#93;.style.background=MenuBgColor'>"
    +"<center><font face="+MenuFont+" size="+SubMenuFontSize+">"
    +"&
    &
    "+SubMenuLinks&#91;i&#93;+"</font></center></div>"&#41;;
    &#125;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    document.write&#40;"<div id='headers"+i+"' style='position&#58;absolute;"
    +"top&#58;0px;"
    +"left&#58;"+&#40;IniPos+=Spacer&#41;+";"
    +"height&#58;0px;"
    +"width&#58;"+MenuWidth+";"
    +"background&#58;"+MenuBgColor+";"
    +"cursor&#58;nw-resize;"
    +"padding&#58;0px'"
    +" onMouseOver='document.all&#91;\"sub"+i+"\"&#93;.style.visibility=\"visible\";"
    +" this.style.background=HighLight'"
    +" onMouseOut='document.all&#91;\"sub"+i+"\"&#93;.style.visibility=\"hidden\";"
    +" this.style.background=MenuBgColor'>"
    +"<center><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"
    +MenuTitles&#91;i&#93;+"</font></center></div>"&#41;;
    &#125;
    &#125;
    function Scroll&#40;&#41;&#123;
    for &#40;i=0; i < MenuAmount; i++&#41;&#123;
    if &#40;document.layers&#41;&#123;
    document.layers&#91;'nsmenu'+i&#93;.top=window.pageYOffset;
    document.layers&#91;'submenu'+i&#93;.top=window.pageYOffset;
    &#125;
    if &#40;document.all&#41;&#123;
    document.all&#91;'headers'+i&#93;.style.top=0+document.body.scrollTop;
    document.all&#91;'sub'+i&#93;.style.top=0+document.body.scrollTop;
    &#125;
    &#125;
    setTimeout&#40;'Scroll&#40;&#41;',150&#41;
    &#125;
    Scroll&#40;&#41;;
    window.onresize=new Function&#40;"window.location.reload&#40;&#41;"&#41;;
    &#125;
    //-->
    </script>

  3. #3
    Meister(in)
    Registriert seit
    10.05.2004
    Ort
    Nähe Frankfurt
    Beiträge
    428
    Danke
    0
    Bekam 0 mal "Danke" in 0 Postings

    Standard

    @PatrickPaulsen
    den script hast du jetzt zum zweitenmal reingestellt

  4. #4
    Ernst
    Gast

    Standard

    und warum läuft es jetzt nich bei netscape?

Ähnliche Themen

  1. Suche Script für DropDown-Menü
    Von Matze Reim Fan im Forum HTML & CSS Forum
    Antworten: 8
    Letzter Beitrag: 20.04.2008, 19:47
  2. Suche Dropdown Menü Script
    Von Buster im Forum Script-Archiv
    Antworten: 2
    Letzter Beitrag: 17.06.2006, 23:14
  3. kleines problem mit nem java script menü
    Von Knüps im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 2
    Letzter Beitrag: 18.08.2005, 20:08
  4. Frage zu nem Java Script Menü
    Von Knüps im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 3
    Letzter Beitrag: 16.08.2005, 17:42
  5. JS Script für Menü ?
    Von s16 im Forum HTML & CSS Forum
    Antworten: 4
    Letzter Beitrag: 24.07.2005, 19:42

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •