northern_light: Radio-Button: Eingabe prüfen

Beitrag lesen

Danke, das war schon sehr hilfreich. Es funktioniert bei mir, solange ich nur den radio-button drin habe. sobald ich die textfelder hinzunehme, geht gar nix mehr. was mache ich falsch? *heul*

es sieht jetzt so aus:

<head>
<script type="text/javascript">
<!--
function chkFormular()
{
 if(document.Formular.name.value == "")  {
   alert("Please type in your name");
   document.Formular.name.focus();
   return false;
  }
 if(document.Formular.organisation.value == "") {
   alert("Please type in your Organisation");
   document.Formular.organisation.focus();
   return false;
  }
   {
  if (document.Formular.agree[0].checked == true) {
    window.location.href = "http://www.pass-net.net/training/index.htm";
  } else {
    alert("Bitte eine Auswahl treffen");
  }
}
//-->
</script>
</head>

<body>

<form name="Formular" action="/system-cgi/formmail.pl" method="post" onSubmit="return chkFormular()">
<pre><p>
<input type=hidden name="recipient" value="xxx@yyy.at">
<input type="hidden" name="redirect" value="http://pass-net.net/training/">

Name: <input type="text" name="name" size="40" maxlength="60" value="">
Organisation: <input type="text" name="organisation" size="40" maxlength="60" value="">
<input type="radio" name="agree" value="yes"> I agree ...

<input type="submit" value="Submit and go to downloads" tabindex="3">
</p>
</pre>
</form>
</body>