Hallo Antje,
poste bitte deine Modifikation des Scriptes. Da kann man dann eher feststellen wo dein Fehler liegt.
Sorry ;-))
Die Änderungen habe ich in den 4 letzten Verweisen vorgenommen,
sie stehen also ganz unten.
--------------------------------------------------------
<html><head><title>Test</title>
<style type="text/css">
<!--
p.Nav { font-size:9pt; font-weight:bold }
a.Navlink:link { color:#FF0000 }
a.Navlink:visited { color:#FF0000 }
a.Navlink:active { color:#000000 }
-->
</style>
<script type="text/javascript">
<!--
function hBeweg(LayerNum,bis_links,Pixel,Pause) {
var Restpixel = bis_links - document.layers[LayerNum].left;
if(bis_links < document.layers[LayerNum].left) Pixel=0-Pixel;
if(Math.abs(Restpixel) > Math.abs(Pixel))
document.layers[LayerNum].moveBy(Pixel,0);
else
document.layers[LayerNum].moveBy(Restpixel,0);
if(document.layers[LayerNum].left != bis_links)
window.setTimeout('hBeweg('+LayerNum+','+bis_links+','+Math.abs(Pixel)+')','+Pause+');
}
function vBeweg(LayerNum,bis_oben,Pixel,Pause) {
var Restpixel = bis_oben - document.layers[LayerNum].top;
if(bis_oben < document.layers[LayerNum].top) Pixel=0-Pixel;
if(Math.abs(Restpixel) > Math.abs(Pixel))
document.layers[LayerNum].moveBy(0,Pixel);
else
document.layers[LayerNum].moveBy(0,Restpixel);
if(document.layers[LayerNum].top != bis_oben)
window.setTimeout('vBeweg('+LayerNum+','+bis_oben+','+Math.abs(Pixel)+')','+Pause+');
}
//-->
</script>
</head><body>
<layer left="10" top="10" width="450" height="250" bgcolor="#FFFF66">
<h1>Einen springen lassen...</h1>
<p>Springe nach:
<a class="Navlink" href="javascript:document.layers[0].moveTo(10,10)">links oben</a> |
<a class="Navlink" href="javascript:document.layers[0].moveTo(260,10)">rechts oben</a> |
<a class="Navlink" href="javascript:document.layers[0].moveTo(10,260)">links unten</a> |
<a class="Navlink" href="javascript:document.layers[0].moveTo(260,260)">rechts unten</a><br></p>
<p>Bewege nach:
<a class="Navlink" href="javascript:hBeweg(0,10,4,60000)">links</a> |
<a class="Navlink" href="javascript:hBeweg(0,260,4,60000)">rechts</a> |
<a class="Navlink" href="javascript:vBeweg(0,10,4,60000)">oben</a> |
<a class="Navlink" href="javascript:vBeweg(0,260,4,60000)">unten</a></p>
</layer>
</body></html>
Viele Grüße
Antje