Slideshow und Layer

Meikel25

Erfahrenes Mitglied
Hallo zusammen!

ich habe ein Problem mit einem Script.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Pro-dent Dentallabor GmbH - Speziallabor für Fräs-, Geschieb- und Keramiktechnik</title>
<meta name="robots" content="index">
<meta name="robots" content="follow">
<meta name="revisit-after" content="10 days">
<meta name="Content-Language" content="de">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

<script language="JavaScript">
<!--
var ZielDatei = "start.htm?team.htm";
if (!top.FramesetGeladen){
if(document.images)
top.location.replace(ZielDatei); 
else 
top.location.href = ZielDatei ;
}
//-->
</script>
<link href="pro-dent.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>

</head>

<body style="background: #ffffff url(images/uns_07.jpg) no-repeat fixed right bottom;">
<div id="bammertz" style="position:absolute; left:15px; top:128px; width:350; height:110; z-index:1; visibility: hidden;">
  <table width="350" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="110"><img src="images/team/brammertz_gross.jpg" width="110" height="150"></td>
      <td width="15">&nbsp;</td>
      <td valign="bottom" class="lauftext"> <span class="headline">Fr. Martine Brammertz</span><br>      <br>        &uuml;berwiegend t&auml;tig im Bereich Edelmetalltechnik, Kombinationstechnik und Implantatrestaurationen. </td>
    </tr>
  </table>
</div>
<table width="400" border="0" cellspacing="0" cellpadding="0">
  <tr class="lauftext">
    <td colspan="2"><img src="images/team.gif" width="198" height="29" border="0"></td>
  </tr>
  <tr class="lauftext">
    <td width="20">&nbsp;</td>
    <td><br>
    <script language="JavaScript1.2">

/*
Conveyor belt slideshow script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com
*/


//Specify the slider's width (in pixels)
var sliderwidth="350px"
//Specify the slider's height
var sliderheight="100px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=2
//configure background color:
slidebgcolor="#ffffff"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="javascript:;" onClick="MM_showHideLayers('bammertz','','show');MM_showHideLayers('dogan','','hide')""><img src="images/team/brammertz.jpg" border=0></a>'
leftrightslide[1]='<a href="http://"><img src="images/team/melzer_rohde.jpg" border=0></a>'
leftrightslide[2]='<a href="http://"><img src="images/team/dogan.jpg" border=0></a>'
leftrightslide[3]='<a href="http://"><img src="images/team/hochscheid.jpg" border=0></a>'
leftrightslide[4]='<a href="http://"><img src="images/team/kuhlkamp.jpg" border=0></a>'
leftrightslide[5]='<a href="http://"><img src="images/team/loesche.jpg" border=0></a>'
leftrightslide[6]='<a href="http://"><img src="images/team/oerschkes.jpg" border=0></a>'
leftrightslide[7]='<a href="http://"><img src="images/team/panster.jpg" border=0></a>'
leftrightslide[8]='<a href="http://"><img src="images/team/piragic.jpg" border=0></a>'
leftrightslide[9]='<a href="http://"><img src="images/team/roloff.jpg" border=0></a>'
leftrightslide[10]='<a href="http://"><img src="images/team/schubert.jpg" border=0></a>'
leftrightslide[11]='<a href="http://"><img src="images/team/stinka.jpg" border=0></a>'
leftrightslide[12]='<a href="http://"><img src="images/team/wagner.jpg" border=0></a>'
leftrightslide[13]='<a href="http://"><img src="images/team/wagner_sabine.jpg" border=0></a>'
leftrightslide[14]='<a href="http://"><img src="images/team/ronacher.jpg" border=0></a>'


////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(" ")+'</nobr>'
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-3000">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide

function fillup(){
if (iedom){
cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+20
}
else if (document.layers){
ns_slide=document.ns_slidemenu.document.ns_slidemenu2
ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
ns_slide.document.write(leftrightslide)
ns_slide.document.close()
actualwidth=ns_slide.document.width
ns_slide2.left=actualwidth+20
ns_slide2.document.write(leftrightslide)
ns_slide2.document.close()
}
lefttime=setInterval("slideleft()",30)
}
window.onload=fillup

function slideleft(){
if (iedom){
if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+30

if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+30

}
else if (document.layers){
if (ns_slide.left>(actualwidth*(-1)+8))
ns_slide.left-=copyspeed
else
ns_slide.left=ns_slide2.left+actualwidth+30

if (ns_slide2.left>(actualwidth*(-1)+8))
ns_slide2.left-=copyspeed
else
ns_slide2.left=ns_slide.left+actualwidth+30
}
}


if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0;top:0"></div>')
write('<div id="test3" style="position:absolute;left:-1000;top:0"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script></td>
  </tr>
  <tr class="lauftext">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr class="lauftext">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

<div id="dogan" style="position:absolute; left:15px; top:128px; width:350; height:110; z-index:2; visibility: hidden;">
  <table width="350" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="110"><img src="images/team/dogan_gross.jpg" width="110" height="150"></td>
      <td width="15">&nbsp;</td>
      <td valign="bottom" class="lauftext"><p class="headline"> Fr. Meythap Dogan-Doru </p>
      <p> ist seit November 2002 In unserem Labor als Kunststofftechnikerin f&uuml;r partielle und totale Prothetik besch&auml;ftigt.</p></td>
    </tr>
  </table>
</div>
</body>
</html>

Was mache ich falsch?
Ohne Layer wird die Bildleiste angeziegt und mit Layern, bekomme ich garnichts angezeigt.
Es wäre cool, wenn jemand eine Lösung meines Problemes hat.

Ich bedanke michschon mal im vorraus...

Mfg
Meikel
 
Wäre nett, wenn du deinen Thread nochmal editiertest und den ganzen unnötigen Kram rausschmeißt (stylesheets, metas, scripts und tags die nicht zum problem gehören etc.) und vielleicht auch das script in ne einigermaßen gut lesbare Form bringest, wir müssen ja nicht die ganze Arbeit für dich machen :rolleyes:
 
Zuletzt bearbeitet:
Du musst in "leftrightslide[0]" die SingleQuotes escapen.
Ein kleiner Blick in die Javascript-Konsole hätte dir das auch offenbart
(Extras>Internetoptionen>Erweitert>Skriptfehler anzeigen>markieren)
 
Was muss ich da genau machen?
Verstehe nur Bahnhof...
Ich habe diese Option eingeschaltet und bekomme " ; wird erwartet".
Was bedeutet das.

Hier noch mal die Zeile.
leftrightslide[0]='<a href="javascript:;" onClick="MM_showHideLayers('bammertz','','show');MM_showHideLayers('dogan','','hide')"><img src="images/team/brammertz.jpg" border=0></a>'

Die Bildleiste wird nicht angezeigt.
Kann mir irgend jemand einen Tipp geben?
 
Naja...das ist doch ne Menge Information,...somit weisst du, wo der Fehler liegt, und was für einer das ist.

Setze in dieser Zeile vor alle einfachen Anführungszeichen einen Backslash .......\'....das nennt man "escapen".
 

Neue Beiträge

Zurück