Archivlink: javarea.de Forum > JavaScript > Mitscrollendes Menü Funktionsfehler
Vollständigen Link anzeigen: javarea.de Forum > JavaScript > Mitscrollendes Menü Funktionsfehler

Pages: [1]

geschrieben von Patriot am 08.10.2005 - 15:10
Hallo

Ich habe ein Problem bei einem mitscrollenden Menü das bei berühren mit der Mouse ausfährt.

Bei meinem wbb Forum und auch anderen Foren ist das Menü eingefahren bei einem Seitenaufruf, so wie es sein sollte, und fährt erst aus wenn man es mit der Mouse berührt. Bei meinem neuen vBulletin 3.0.9 ist das Menü ausgefahren bei einem Seitenaufruf und fährt erst ein wenn man mit der Mouse drüberfährt. Dies sollte so nicht sein und ich finde und weiss einfach nicht warum dies so ist.
Das Script ist wie sonst überall auch im Header eingebaut.
Kann mir bitte jemand weiterhelfen und einen Tipp geben wie ich es hinbekomme das das Menü beim laden einer Seite eingefahren ist ?

Das Script folgt im nächsten Beitrag.

Mit Dank im voraus, Patriot.

geschrieben von Patriot am 08.10.2005 - 15:11
HTML-Quelltext
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: 
176: 
177: 
178: 
179: 
180: 
181: 
182: 
183: 
184: 
185: 
186: 
187: 
188: 
189: 
190: 
191: 
192: 
193: 
194: 
195: 
196: 
197: 
198: 
199: 
200: 
201: 
202: 
203: 
204: 
205: 
206: 
207: 
<SCRIPT language="JavaScript"> 

// Default settings. Don't change them. 

YOffset=20; // no quotes!! 

staticYOffset=20; // no quotes!! 

slideSpeed=20 // no quotes!! 

waitTime=1000; // no quotes!! this sets the time the menu stays out for after the mouse goes off it. 

hdrFontFamily="Verdana"; 

hdrFontSize="3"; 

hdrFontColor="white"; 

hdrBGColor="#FFFFFF"; 

hdrAlign="right"; 

hdrVAlign="center"; 

hdrHeight="20"; 

linkFontFamily="Verdana"; 

linkFontSize="2"; 

linkBGColor="white"; 

linkOverBGColor="#738FBF"; 

linkTarget="_self"; 

linkAlign="left"; 

menuBGColor="white"; 

menuIsStatic="yes"; 

menuWidth=110; // Must be a multiple of 10! no quotes!! 

barBGColor="#FFFFFF"; 

barFontFamily="Verdana"; 

barFontSize="2"; 

barFontColor="white"; 

barVAlign="top"; 

barWidth=20; // no quotes!! 

NS6 = (document.getElementById&&!document.all) 

IE = (document.all) 

NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4") 

moving=setTimeout('null',1) 

function kapelle() { 



kap=window.open("http://trmedia.covers.de/ass-alsfeld/kapelle.html","Fenster2","resizable=no,height=200,width=320"); 

} 

function moveOut() { 

if ((NS6 && parseInt(ssm.left)<0)||(IE && ssm.style.pixelLeft<0)||(NS && document.ssm.left<0)) { 

clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed) 

if (NS6) {ssm.left = parseInt(ssm.left)+10+"px";} 

if (IE) {ssm.style.pixelLeft += 10;} 

if (NS) {document.ssm.left += 10;}} 

else {clearTimeout(moving);moving=setTimeout('null',1)}}; 

function moveBack() { 

clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)} 

function moveBack1() { 

if ((NS6 && parseInt(ssm.left)>(-menuWidth))||(IE && ssm.style.pixelLeft>(-menuWidth))||(NS && document.ssm.left>(-menuWidth))) { 

clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed); 

if (NS6) {ssm.left = parseInt(ssm.left)-10+"px";} 

if (IE) {ssm.style.pixelLeft -= 10;} 

if (NS) {document.ssm.left -= 10;}} 

else {clearTimeout(moving);moving=setTimeout('null',1)}}; 

lastY = 0; 

function makeStatic() { 

if (NS6) {winY = window.pageYOffset;} 

if (IE) {winY = document.body.scrollTop;var NM=document.all('ssm').style} 

if (NS) {winY = window.pageYOffset;var NM=document.ssm} 

if (NS6||IE||NS) { 

if (winY!=lastY&&winY>YOffset-staticYOffset) { 

smooth = .2 * (winY - lastY - YOffset + staticYOffset);} 

else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) { 

smooth = .2 * (winY - lastY);} 

else {smooth=0} 

if(smooth > 0) smooth = Math.ceil(smooth); 

else smooth = Math.floor(smooth); 

if (NS6) ssm.top=parseInt(ssm.top)+smooth+"px" 

if (IE) NM.pixelTop+=smooth; 

if (NS) NM.top+=smooth; 

lastY = lastY+smooth; 

setTimeout('makeStatic()', 1)}} 

function initSlide() { 

if (NS6){ 

ssm=document.getElementById("ssm").style 

ssm.visibility="visible"; 

ssm.left = -menuWidth;} 

else if (IE) { 

ssm.style.visibility = "visible" 

ssm.style.pixelLeft = -menuWidth;} 

else if (NS) { 

document.ssm.left = -menuWidth; 

document.ssm.visibility = "show"} 

if (menuIsStatic=="no") makeStatic();} 

function startMenu(menuHeader, barText) { 

if (IE||NS6) {document.write('<DIV ID="ssm" style="visibility:hidden; position:absolute; left:0px; top:'+YOffset+'px; z-index:20; width:1px; " onmouseover="moveOut()" onmouseout="moveBack()">')} 

if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm" bgcolor="#FFFFFF" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')} 

if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+2)+'" bgcolor="#DDDDDD"><TR><TD>')} 

tempBar="" 

for (i=0;i<barText.length;i++) { 

tempBar+=barText.substring(i, i+1)+"<BR>"} 

document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+2)+'" bgcolor="#DDDDDD"><tr><td bgcolor="#01009A" WIDTH="'+(menuWidth-1)+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center" rowspan="100" width="'+barWidth+'" bgcolor="#01009A" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')} 

function addItem(text, link, target) { 

document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+(menuWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" CLASS="ssmItems" target="'+target+'">'+text+'</DIV></LAYER></ILAYER></TD></TR>')} 

function addExItem(text, link, target) { 

document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+(menuWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssmItems">'+text+'</DIV></LAYER></ILAYER></TD></TR>')} 

function addExPic(text, link, target) { 

document.write('<TR><TD cellpadding="2" BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+(menuWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssmItems"><img src="'+text+'" border="0"></A></DIV></LAYER></ILAYER></TD></TR>')} 

function addHdr(text) { 

document.write('<tr><td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+(menuWidth-1)+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')} 

function endMenu() { 

document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial"> </font></td></TR></table>') 

if (NS6){document.write('</TD></TR></TABLE>')} 

if (IE||NS6) {document.write('</DIV>')} 

if (NS) {document.write('</LAYER>')} 

if (NS6||IE||NS) setTimeout('initSlide();', 100)}


weiter -->

geschrieben von Patriot am 08.10.2005 - 15:12
HTML-Quelltext
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: 
YOffset=50; 
staticYOffset=50; 
slideSpeed=40; 
waitTime=100; 
menuBGColor="#FFFFFF"; 
menuIsStatic="no"; 
menuWidth=120; 
hdrFontFamily="Verdana, Arial, Helvetica, sans-serif"; 
hdrFontSize="1"; 
hdrFontColor="#FFFFFF"; 
hdrBGColor="#738FBE"; 
hdrAlign="left"; 
hdrVAlign="center"; 
hdrHeight="1"; 
linkFontFamily="Verdana, Arial, Helvetica, sans-serif"; 
linkFontSize="1"; 
linkBGColor="#3399FE"; 
linkOverBGColor="738FBF"; 
linkAlign="left"; 
barBGColor="#990033"; 
barFontFamily="Verdana, Arial, Helvetica, sans-serif"; 
barFontSize="1"; 
barFontColor="#FFFFFF"; 
barVAlign="center"; 
barWidth=15; 
startMenu("Forum XXXXX", "Navi");

addExItem("Forum-Startseite", "forum.php", "_self");
addExItem("Portal-Startseite", "index.php", "_self");
addExItem("Registrieren", "register.php", "_self");
addExItem("Neueste Beiträge", "search.php?do=getnew", "_self");
addExItem("PN Nachrichten", "private.php", "_self");
addExItem("Suchen", "search.php", "_self");
addExItem("Kontrollzetrum", "usercp.php", "_self");

endMenu(); 
//--> 
</SCRIPT>


(Sorry das Script hat zuviele Zeichen bzw. ich darf hier nicht soviel posten.)

geschrieben von Patriot am 09.10.2005 - 05:47
Problem ist behoben.


Powered by: JBB v.2.0.4 Copyright ©2000-2006, www.javarea.de.