Hallo! Ich bastele an folgendem Script. Es soll verhindern, dass man bestimmte Seiten aufrufen kann. Nur leider scheint es nicht zu funktionieren. Der Teil der nicht zu funktionieren scheint ist wohl :
for (var i=0; i < Erlaubt.length; i++)
else if(URL != Erlaubt[i]) {
aber ich weiss nicht wieso!
Wäre nett, wenn mir ja jemand helfen könnte!
<html>
<head>
<title>link.html</title>
<script language="JavaScript">
<!--
var Erlaubt = new Array("http://www.hornung.net/","http://www.gmx.de/");
function Go(URL) {
if (URL == null) {
document.GoURL.URL.focus(); }
for (var i=0; i < Erlaubt.length; i++)
else if(URL != Erlaubt[i]) {
alert("Die Seite ist nicht zugänglich für Sie!"); }
else {
parent.frames[1].location.href=URL; } }
//-->
</script>
</head>
<body bgcolor="e1e1e1">
<form name="GoURL" action="">
<input type="text" name="URL" value="http://" size="50">
<input type="button" name="" value="Gehe zu" onClick="Go(document.GoURL.URL.value)">
</form>
</body>
</html>