matthias: formular zurücksetzen

Beitrag lesen

hallo burkhard,

danke für deine mühen, hier der code:

-------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
  <title></title>
  <script>
  <!--
    function loeschen() {
      document.anfrageformular.anrede.value = "";
      document.anfrageformular.vorname.value = "";

document.anfrageformular.anfragetyp(0).checked = false;
      document.anfrageformular.anfragetyp(1).checked = false;
      document.anfrageformular.anfragetyp(2).checked = false;

document.anfrageformular.an(0).checked = false;
      document.anfrageformular.an(1).checked = false;
      document.anfrageformular.an(2).checked = false;

document.anfrageformular.an_tag.selectedIndex = 0;
      document.anfrageformular.an_monat.selectedIndex = 0;
      document.anfrageformular.an_jahr.selectedIndex = 0;

//return false;
    }
  // -->
  </script>
</head>

<body bgcolor="#ffffcc">
  <form name="anfrageformular" action="http://.../cgi-bin/formmail.cgi" method="post">
    <table border="0" cellpadding="4" cellspacing="0" width="379">
      <tr>
        <td><input type="text" name="anrede" size="40">name</td>
      </tr>
      <tr>
        <td><input type="text" name="vorname" size="40">vorname</td>
      </tr>
      <tr>
        <td><font face="Verdana" size="1"><input type="checkbox" value="zimmer" name="anfragetyp">Zimmer buchen<br>
          <input type="checkbox" value="anfrage" name="anfragetyp">Anfrage<br>
          <input type="checkbox" value="prospekt" name="anfragetyp">Prospekt anfordern</font>
        </td>
      </tr>
      <tr>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" width="86">
            <tr>
              <td align="center" valign="top"><font face="Verdana" size="1">Mo</font></td>
              <td align="center" valign="top"><font face="Verdana" size="1">Di</font></td>
              <td align="center" valign="top"><font face="Verdana" size="1">Mi</font></td>
            </tr>
            <tr>
              <td align="center" valign="top"><input type="radio" name="an" value="Montag"></td>
              <td align="center" valign="top"><input type="radio" name="an" value="Dienstag"></td>
              <td align="center" valign="top"><input type="radio" name="an" value="Mittwoch"></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td>
          <table border="0" cellpadding="0" cellspacing="0" width="279">
            <tr>
              <td valign="middle" align="left" width="89"><select name="an_tag" size="1">
                  <option>- - - Tag - - -</option>
                  <option value="1">01.</option>
                  <option value="2">02.</option>
                </select></td>
              <td valign="middle" align="left" width="100">
                <select name="an_monat" size="1">
                  <option>- - - Monat - - -</option>
                  <option value="1">Januar</option>
                  <option value="2">Februar</option>
                </select></td>
              <td valign="middle" align="left" width="90">
                <select name="an_jahr" size="1">
                  <option>- - - Jahr - - -</option>
                  <option value="1">2001</option>
                  <option value="2">2002</option>
                </select></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td><a href="javascript:loeschen()"><img src="loeschen.gif" width="150" height="30" border="0"></a></td>
      </tr>
    </table>
  </form>
</body>
</html>
-----------------------------------------------

gruß
matthias