Hallo!
Kann mir einer sagen, warum dieses Script den Anker nicht findet?
<html><head><title>Test</title>
</head>
<script type="text/javascript">
<!--
wert1 = "hallo";
wert2 = "hallo1";
function test()
{
if(document.anchors[wert1])
{location.href= "#"+wert1}
else if(document.anchors[wert2])
{location.href= "#"+wert2 }
else {
alert("Not found!")
}
}
//-->
</script>
<body onload="test()">
<a name="hallo" href="#">ddd</a>
</body>
</html>
Das Script steht jetzt hier schon mehrfach im Forum, aber leider ist die richtige Lösung bis jetzt immer noch ausgeblieben. Deshalb wäre ich euch für eure richtige Hilfe dankbar!
Gruß David!