tutorials.de Buch-Aktion 05/2012
ERLEDIGT
NEIN
ANTWORTEN
1
ZUGRIFFE
562
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    Stoned eichel Stoned eichel ist offline Mitglied Bronze
    Registriert seit
    Feb 2004
    Ort
    Wilhelmsburg
    Beiträge
    39
    Hi hab hier so´ein Javascript und find das auch voll geil nur hab ich sehr wenig ahnung von Java und würde mich freuen wenn mir das einer bearbeiten könnte!
    BEi diesem Script ist eine menüleiste die Ständig mitscrollt ich will aber keine Menüleiste sondern normalen Text Der mitscrollt und er soll nicht oben am Browserfenster befinden sonder unten am browserfenster.
    Bin echt jedem Dankbar wer mir hilft!
    Aber hier erstmal der Quelltext:
    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    
    <html>
    <head>
    <title>lol test</title>
    <style type="text/css"> 
    <!-- 
    a.x:link, a.x:visited, a.x:active{color:#ffffff;text-decoration:none} 
    //--> 
    </style>
    <head>
    <body marginheight="25" topmargin="25">
    <script language="javascript"> 
      
    MenuWidth=170;           //Breite des Menus. 
    MenuFont='Arial,Verdana'; 
    MenuFontSize=2;          //nur 1 bis 7, 2 scheint genau richtig ;-). 
    MenuFontColor='#ffffff'; 
    MenuBgColor='#5b7693'; 
    HighLight='#b4c3d4'; 
    Separater=2;             //Abstand um die Menus. 
    Centre=true;             //true oder false. 
     
    //!hier nichts ändern, geh gleich weiter zu "Links"! 
     
    n4=(document.layers); 
    n6=(document.getElementById&&!document.all); 
    ie=(document.all); 
    h=(ie)?document.body.clientHeight:window.innerHeight; 
    w=(ie)?document.body.clientWidth:window.innerWidth; 
    Titles=new Array() 
    Links=new Array() 
     
    algn1=(Centre)?'<center>':''; 
    algn2=(Centre)?'</center>':''; 
     
    function colour2(c){(n4)?c.bgColor=HighLight:c.style.background=HighLight}// 
    function colour1(c){(n4)?c.bgColor=MenuBgColor:c.style.background=MenuBgColor}// 
     
    var OpenLayer=(n4)?"<br><layer height=100% width=100% onMouseOver='colour1(this)'; onMouseOut='colour2(this)'>"+algn1:"<div style='height:auto;width:100%' onMouseOver='colour1(this)'; onMouseOut='colour2(this)'><font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"; 
    var CloseLayer=(n4)?algn2+"</layer>":"</font></div>"; 
     
    var vs=(n4)?"<font face='Wingdings' color="+MenuBgColor+">n</font>":OpenLayer+" "+CloseLayer+"<font color="+MenuBgColor+">"+String.fromCharCode(9660)+"</font>"; 
      
     
    /*************************************Links**************************************** 
     
    Ändere die Titel nach Wahl, achte darauf, dass die Reihenfolger der Nummerierung stimmt. 
     
    Trag danach Deine Links ein. 
    Beispiel: 
    +OpenLayer+"<a href='http://www.google.com' class='x'>Search with Google</a>"+CloseLayer 
     
    Wenn der Link Anführungszeichen beinhaltet, maskiere sie mit einem Backslash. 
    Beispiel: 
    ...class='x'> What\'s new </a>"+C... 
     
    ***************************************************************************************/ 
     
    Titles[0]='Intern'; 
    Titles[1]='Kontakt'; 
    Titles[2]='Service'; 
    Titles[3]='Webdesign'; 
      
     
    Links[0]=vs 
    +OpenLayer+"<a href='./' class='x'>Startseite</a>"+CloseLayer 
    +OpenLayer+"<a href='links.htm' class='x'>Links</a>"+CloseLayer 
    +OpenLayer+"<a href='disclaimer.htm' class='x'>Disclaimer</a>"+CloseLayer 
    +OpenLayer+"<a href='impressum.htm' class='x'>Impressum</a>"+CloseLayer 
      
     
    Links[1]=vs 
    +OpenLayer+"<a href='http://www.diekleinschreiber.de/mich/gaestebuch.php4' class='x'>Gästebuch</a>"+CloseLayer 
    +OpenLayer+"<a href='kontakte.htm' class='x'>Kontakt</a>"+CloseLayer 
     
      
     
    Links[2]=vs 
    +OpenLayer+"<a href='downloads.htm' class='x'>Download</a>"+CloseLayer 
    +OpenLayer+"<a href='generatoren.htm' class='x'>Generatoren</a>"+CloseLayer 
    +OpenLayer+"<a href='websitecheck.htm' class='x'>Website Check</a>"+CloseLayer 
     
    Links[3]=vs 
    +OpenLayer+"<a href='html.htm' class='x'>HTML Codes</a>"+CloseLayer 
    +OpenLayer+"<a href='dhtml.htm' class='x'>DHTML Scripts</a>"+CloseLayer 
    +OpenLayer+"<a href='js.htm' class='x'>Java Scripts</a>"+CloseLayer 
     
     
    //!Ab hier nichts mehr ändern! 
     
    w1=(MenuWidth+Separater)*Titles.length; 
    w2=w/2; 
    i1=w2-MenuWidth-Separater-w1/2; 
    i2=w2-MenuWidth-Separater-w1/2; 
    s1=MenuWidth+Separater; 
    s2=MenuWidth+Separater; 
    if (w1 > w2*2){i1=-MenuWidth;i2=-MenuWidth} 
    vy=(n4)?'show':'visible'; 
    vn=(n4)?'hide':'hidden'; 
     
    //Don't mess about with N4, just use layers. 
    if (n4){ 
    for (i=0; i < Titles.length; i++){ 
    document.write("<layer name='lnks"+i+"' top=0 left="+(i2+=s2)+" " 
    +" width="+MenuWidth+" bgcolor="+HighLight+" visibility=hide" 
    +" onMouseOver='this.visibility=vy; var cd=this.id.length-1; var ab=this.id.charAt(cd); H(ab)' " 
    +" onMouseOut='this.visibility=vn; var ef=this.id.length-1; var gh=this.id.charAt(ef); B(gh)'>" 
    +algn1+"<font face="+MenuFont+" size="+MenuFontSize+">" 
    +" <br>"+Links[i]+"</font>"+algn2+"</layer>"); 
    document.write("<layer name='ttls"+i+"' top=0 left="+(i1+=s1)+" height=0 " 
    +"width="+MenuWidth+" bgcolor="+MenuBgColor+" " 
    +"onMouseOver=\"this.bgColor=HighLight; var e=this.id.length-1; var d=this.id.charAt(e); On(d)\" " 
    +"onMouseOut=\"this.bgColor=MenuBgColor; var e=this.id.length-1; var d=this.id.charAt(e); Off(d)\">" 
    +algn1+"<font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">" 
    +Titles[i]+"</font>"+algn2+"</layer>"); 
    } 
     
    function On(x){for (i=0; i < Titles.length; i++)document.layers['lnks'+x].visibility=vy} 
    function Off(x){for (i=0; i < Titles.length; i++)document.layers['lnks'+x].visibility=vn} 
    function B(y){for (i=0; i < Titles.length; i++)document.layers['ttls'+y].bgColor=MenuBgColor} 
    function H(y){for (i=0; i < Titles.length; i++)document.layers['ttls'+y].bgColor=HighLight} 
    } 
    if (!n4){ 
    for (i=0; i < Titles.length; i++){ 
    document.write("<div id='lnks"+i+"' style='position:absolute;" 
    +"top:0px;left:"+(i2+=s2)+"px;width:"+MenuWidth+"px;" 
    +"background:"+HighLight+";visibility:hidden'" 
    +" onMouseOver='this.style.visibility=vy; document.getElementById(\"ttls"+i+"\").style.background=HighLight';" 
    +" onMouseOut='this.style.visibility=vn; document.getElementById(\"ttls"+i+"\").style.background=MenuBgColor'>" 
    +algn1+Links[i]+algn2+"</div>"); 
    document.write("<div id='ttls"+i+"' style='position:absolute;top:0px;left:"+(i1+=s1)+"px;height:auto;width:"+MenuWidth+"px;" 
    +"background:"+MenuBgColor+";cursor:default'" 
    +" onMouseOver='document.getElementById(\"lnks"+i+"\").style.visibility=vy;this.style.background=HighLight'" 
    +" onMouseOut='document.getElementById(\"lnks"+i+"\").style.visibility=vn;this.style.background=MenuBgColor'>" 
    +algn1+"<font face="+MenuFont+" size="+MenuFontSize+" color="+MenuFontColor+">"+Titles[i]+"</font>"+algn2+"</div>"); 
    } 
    } 
     
    function Scroll(){ 
    sy=(ie)?document.body.scrollTop:window.pageYOffset; 
    for (i=0; i < Titles.length; i++){ 
    if (n4){ 
     document.layers['ttls'+i].top=Separater+sy; 
     document.layers['lnks'+i].top=Separater+sy; 
     } 
    else{ 
     document.getElementById("ttls"+i).style.top=Separater+sy; 
     document.getElementById("lnks"+i).style.top=Separater+sy; 
     } 
    } 
    setTimeout('Scroll()',150) 
    } 
    Scroll(); 
    window.onresize=new Function("window.location.reload()"); 
      
     
    if (!n4){ 
    for (i=0; i < document.links.length; i++){ 
     if (document.links[i].href == this.window.location.href) 
      { 
      document.links[i].style.color=MenuBgColor; 
      document.links[i].style.cursor='crosshair'; 
      document.links[i].innerHTML+=' -'; 
      alert(i+' '+document.links[i].href); 
      break; 
      } 
     } 
    } 
    //--> 
      </script>
    SCroll mal bitte dann weisst du was ich meine:-)
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>Hallo
    </body>
     
     
    </html>

    Und sorry für den Langen Code aber kürzer gings nicht danke schonmal im Vorraus wenn ihr schon so was fertiges habt dann nur her damit danke!
     

  2. #2
    Stoned eichel Stoned eichel ist offline Mitglied Bronze
    Registriert seit
    Feb 2004
    Ort
    Wilhelmsburg
    Beiträge
    39
    Ok das Problem wurde schon gelösst ich danke Fatalus!
    Ihr könnt den Thread löschen
     

Ähnliche Themen

  1. Scrollen von Text
    Von ava99 im Forum Javascript & Ajax
    Antworten: 4
    Letzter Beitrag: 07.08.08, 09:07
  2. Text mitlaufen lassen...
    Von Mailyn im Forum Visual Basic 6.0
    Antworten: 6
    Letzter Beitrag: 03.11.05, 18:22
  3. dynamischen Text scrollen
    Von sirina im Forum Flash Plattform
    Antworten: 4
    Letzter Beitrag: 28.12.04, 12:41
  4. Text mit scrollen mitlaufen
    Von Stoned eichel im Forum HTML & XHTML
    Antworten: 7
    Letzter Beitrag: 04.03.04, 11:41
  5. Variablen Text scrollen....
    Von GoodFella im Forum Flash Plattform
    Antworten: 4
    Letzter Beitrag: 06.04.01, 20:36