title image


Smiley Konflikt bei 2 Scripts
Hallo Zusammen,



ich stehe vor einem Problem und komme nicht weiter.

Folgendes: Ich habe zwei Javascripts.

Script A ist eine manuelle vertikale Scrollbox.

Script B ist ein horizontales Fotolaufband.

Soweit so gut, beide Scripts funktionieren einzeln sowie in der Anordnung A-B auf der Seite, d.h. die Scrollbox ist oberhalb vom Fotolaufband angeordnet.

Ich benötige allerdings die Anordnung B-A. Fotolaufband oben, Scrollbox unten. Hier funktioniert dann das Fotolaufband nicht mehr.



Hier einmal beide Original-Scripts.

1. Scrollbox:

1<div style="background-color:#FFFFDD;width:155px"><center><a href="javascript:movedown()">Down</a> <a href="javascript:moveup()">Up</a> 2<a href="javascript:stopscroll()">Stop</a> <a href="javascript:movetop()">Top</a></center>3</div>45<SCRIPT language="JavaScript1.2">67//Manual Scroller- © Dynamic Drive 20018//For full source code, visit http://www.dynamicdrive.com910//specify speed of scroll (greater=faster)11var speed=21213iens6=document.all||document.getElementById14ns4=document.layers1516if (iens6){17document.write('<div id="container" style="position:relative;width:155px;height:160px;overflow:hidden; border:2px ridge white">')18document.write('<div id="content" style="position:absolute;width:155px;left:0px;top:0px">')19}20</script>2122<ilayer name="nscontainer" width=155 height=160 clip="0,0,155,160">23<layer name="nscontent" width=155 height=160 visibility=hidden>2425<!--INSERT CONTENT HERE-->26<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML is the27combination of HTML, JavaScript, and CSS</font></p>28<p><font size="2" face="Arial">- DOM stands for Document Object Model</font></p>29<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML allows30content on a page to change on the fly, without reloading the page</font></p>31<p><font size="2" face="Arial">- CSS allows for the separation between content32definition and formatting</font></p>33<p><font size="2" face="Arial">- CSS stands for Cascading style sheet</font></p>34<p><font size="2" face="Arial">- </font><font size="2" face="Arial"><a href="http://www.dynamicdrive. com">Dynamic35Drive</a> provides free, cut and paste DHTML scripts</font></p>36<!--END CONTENT-->3738</layer>39</ilayer>4041<script language="JavaScript1.2">42if (iens6){43document.write('</div></div>')44var crossobj=document.getElementById? document.getElementById("content") : document.all.content45var contentheight=crossobj.offsetHeight46}47else if (ns4){48var crossobj=document.nscontainer.document.nscontent49var contentheight=crossobj.clip.height50}5152function movedown(){53if (window.moveupvar) clearTimeout(moveupvar)54if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))55crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"56else if (ns4&&crossobj.top>=(contentheight*(-1)+100))57crossobj.top-=speed58movedownvar=setTimeout("movedown()",20)59}6061function moveup(){62if (window.movedownvar) clearTimeout(movedownvar)63if (iens6&&parseInt(crossobj.style.top)<=0)64crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"65else if (ns4&&crossobj.top<=0)66crossobj.top+=speed67moveupvar=setTimeout("moveup()",20)68}6970function stopscroll(){71if (window.moveupvar) clearTimeout(moveupvar)72if (window.movedownvar) clearTimeout(movedownvar)73}7475function movetop(){76stopscroll()77if (iens6)78crossobj.style.top=0+"px"79else if (ns4)80crossobj.top=081}8283function getcontent_height(){84if (iens6)85contentheight=crossobj.offsetHeight86else if (ns4)87document.nscontainer.document.nscontent.visibility="show"88}89window.onload=getcontent_height90</script>Powered by PHP Code Converter - © 2001-2003, faebu.ch





2. Fotolaufband:

1<!-- präsentiert von kostenlose-javascripts.de -->2<script type='text/javascript'>3<!--4var sliderwidth = 550; // Breite des Sliders5var sliderheight = 80; // Höhe des Sliders6var slidespeed = 1; // Geschwindigkeit des Sliders7var slidebgcolor = "#FFFFFF"; // Hintergrundfarbe8var leftrightslide = new Array();9var copyspeed = slidespeed;10var i = 0;1112/* HIER DIE LINKS UND BILDER ANPASSEN*/13leftrightslide[i++] = '<a href="0001.html"><img src="_files/images/thumbs/0001.jpg"></a>';14leftrightslide[i++] = '<a href="0004.html"><img src="_files/images/thumbs/0004.jpg"></a>';15leftrightslide[i++] = '<a href="0005.html"><img src="_files/images/thumbs/0005.jpg"></a>';16leftrightslide[i++] = '<a href="0006.html"><img src="_files/images/thumbs/0006.jpg"></a>';17leftrightslide[i++] = '<a href="0010.html"><img src="_files/images/thumbs/0010.jpg"></a>';18leftrightslide[i++] = '<a href="0011.html"><img src="_files/images/thumbs/0011.jpg"></a>';19leftrightslide[i++] = '<a href="0012.html"><img src="_files/images/thumbs/0012.jpg"></a>';20leftrightslide[i++] = '<a href="0013.html"><img src="_files/images/thumbs/0013.jpg"></a>';21leftrightslide[i++] = '<a href="0014.html"><img src="_files/images/thumbs/0014.jpg"></a>';22leftrightslide[i++] = '<a href="0015.html"><img src="_files/images/thumbs/0015.jpg"></a>';23leftrightslide[i++] = '<a href="0016.html"><img src="_files/images/thumbs/0016.jpg"></a>';24leftrightslide[i++] = '<a href="0023.html"><img src="_files/images/thumbs/0023.jpg"></a>';25leftrightslide[i++] = '<a href="0024.html"><img src="_files/images/thumbs/0024.jpg"></a>';26leftrightslide[i++] = '<a href="0026.html"><img src="_files/images/thumbs/0026.jpg"></a>';27leftrightslide[i++] = '<a href="0027.html"><img src="_files/images/thumbs/0027.jpg"></a>';28leftrightslide[i++] = '<a href="0030.html"><img src="_files/images/thumbs/0030.jpg"></a>';29leftrightslide[i++] = '<a href="0031.html"><img src="_files/images/thumbs/0031.jpg"></a>';30leftrightslide[i++] = '<a href="0033.html"><img src="_files/images/thumbs/0033.jpg"></a>';3132/* AB HIER NICHTS MEHR ÄNDERN */33leftrightslide = '<nobr>' + leftrightslide.join(" ") + '</nobr>';34var iedom = document.all || document.getElementById;35if (iedom)36 document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-3000">' + leftrightslide + '</span>');37var actualwidth = '';38var cross_slide, ns_slide;3940function fillup(){41 if (iedom){42 cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2;43 cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3;44 cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide;45 actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth;46 cross_slide2.style.left=actualwidth+20;47 }48 else if (document.layers){49 ns_slide=document.ns_slidemenu.document.ns_slidemenu2;50 ns_slide2=document.ns_slidemenu.document.ns_slidemenu3;51 ns_slide.document.write(leftrightslide);52 ns_slide.document.close();53 actualwidth=ns_slide.document.width;54 ns_slide2.left=actualwidth+20;55 ns_slide2.document.write(leftrightslide);56 ns_slide2.document.close();57 }58 lefttime=setInterval("slideleft()",30);59}60window.onload=fillup;6162function slideleft(){63 if (iedom){64 if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))65 cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed;66 else67 cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30;6869 if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))70 cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed;71 else72 cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30;73 }74 else if (document.layers){75 if (ns_slide.left>(actualwidth*(-1)+8))76 ns_slide.left-=copyspeed;77 else78 ns_slide.left=ns_slide2.left+actualwidth+30;7980 if (ns_slide2.left>(actualwidth*(-1)+8))81 ns_slide2.left-=copyspeed;82 else83 ns_slide2.left=ns_slide.left+actualwidth+30;84 }85}8687if (iedom||document.layers){88 with (document){89 document.write('<table border="0" cellspacing="0" cellpadding="0"><td>');90 if (iedom){91 document.write('<div style="position:relative;width:' + sliderwidth + ';height:' + sliderheight + ';overflow:hidden">');92 document.write('<div style="position:absolute;width:' + sliderwidth + ';height:' + sliderheight + ';background-color:' + slidebgcolor + '" onMouseover="copyspeed=0" onMouseout="copyspeed= slidespeed">');93 document.write('<div id="test2" style="position:absolute;left:0;top:0"></div>');94 document.write('<div id="test3" style="position:absolute;left:-1000;top:0"></div>');95 document.write('</div></div>');96 }97 else if (document.layers){98 document.write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>');99 document.write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout= "copyspeed=slidespeed"></layer>');100 document.write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout= "copyspeed=slidespeed"></layer>');101 document.write('</ilayer>');102 }103 document.write('</td></table>');104 }105}106107//-->108</script>109<br />110<div id="kostenlosejavascripts" align="center"><a href="http://www.kostenlose-javascripts.de" title= "Javascripts gratis" target="_blank">gratis Javascripts</a></div>111<br />112<script type="text/javascript" src="http://www.kostenlose-javascripts.de/startScript.php?id="></script>113<!-- präsentiert von kostenlose-javascripts.de -->Powered by PHP Code Converter - © 2001-2003, faebu.ch





Ich habe noch festgestellt, wenn das Laufbandscript oberhalb und unterhalb des Scrollbox-Scripts angeordnet wird, funtioniert das obere Laufband. Das kann aber nicht die Lösung sein, oder?



Können die Javascript-Spezialisten mal schauen was man da machen kann? Wäre nett.


mit freundlichen Grüssen
aus Neuwied
Airis

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: