Kersten Lohmeyer: Kann keinen Fahler in diesem JS finden, ersuche Hilfe!

Beitrag lesen

Hallo zusammen,

hier ist der source-code, schaut ihn Euch bitte mal an was daran falsch sein könnte:

<html>
<head>
<title>Suche nach Musik im Internet</title>
<script language=javascript>
<!-- hide

function start() {
  var st= document.eingabe.search.value;
  var suche= "";
  for (var i=0; i< st.length; i++) {
    var zeichen= st.substring(i, i+1);
    if (zeichen==" ") suche+= "+"
    else suche+= zeichen;

var checkedButton = "";
  for (var i in document.eingabe.radiobutton) {
      if (document.eingabe.radiobutton[i].checked=="1") {
         checkedButton=document.eingabe.radiobutton[i].value; }}
}
  
  // Yahoo
  if (checkedButton == "yahoo") {
    var yahoo= window.open("http://search.yahoo.com/bin/search?p="+suche,
                "yahoo", "menubar=yes,toolbar=yes,scrollbars=yes");
  }

// Lycos
  if (checkedButton == "lycos") {
    var lycos= window.open("http://lycos.cs.cmu.edu/cgi-bin/pursuit?query="+suche+"&ab=the_catalog",
                "lycos", "menubar=yes,toolbar=yes,scrollbars=yes");
  }

// Excite
  if (checkedButton == "excite") {
    var excite= window.open("http://www.excite.com/search.gw?search="+suche+"&collection=web&searchType=Concept&mode=relevance&showqbe=1&display=html2%2Clb",
                "excite", "menubar=yes,toolbar=yes,scrollbars=yes");
  }

}

// -->
</script>
<meta content="MSHTML 5.00.2014.210" name=GENERATOR>
</head>

<body bgcolor="#ffffff" background="images/hintergrchrom.jpg" alink="#0000b5" link="#b50000" text="#000000" vlink="#0000b5">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="77" name="suchfr">
  <tr>
    <td width="13%"> </td>
    <td align="left" valign="top" width="42%"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <!-- saved from url=(0060)http://www.dpunkt.de/javascript/bsp/script2/suche/suche.html -->
      <center>
        <form name=eingabe onSubmit="start();return false;">
          Suchbegriff:
          <input
name=search size=20>
          <input onClick=start() type=submit value="Suche" name="Submit">
          <input type="reset" name="Submit2" value="Entf">
          <br>
          <input type="radio" name="radiobutton" value="weltweit" checked>
          weltweit
          <input type="radio" name="radiobutton" value="de">
          .de
        </form>
      </center>
      <center>
        <font size=-1> </font>
      </center>

</td>
    <td width="45%" align="center" valign="top"><img src="images/werbebanner.gif" width="304" height="54" vspace="0" hspace="0"></td>
  </tr>
</table>
</body>
</html>