Hallo!
Dieses Script soll den Vornamen & Nachnamen prüfen…prüft aber nur den Vornamen. Wo liegt der Fehler?
Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>formularjavascgribtmsolution</TITLE>
<SCRIPT language="JavaScript">
<!--
function pruefe_Nachname()
{
var Eingabe;
Eingabe==window.document.rb.Nachname.value;
if (Eingabe=="")
{
alert ("Bitte den Nachnamen angeben!");
return false;
}
return pruefe_Vorname();
}
function pruefe_Vorname()
{
var Eingabe;
Eingabe=window.document.rb.Vorname.value;
if (Eingabe=="")
{
alert ("Bitte den Vornamen angeben!");
return false;
}
}
//-->
</SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#FF00FF" alink="#FF0000">
<FORM name=rb action="mailto:mustermann@gmx.de" method="post" enctype="text/plain">
<fieldset>
<legend>[b]Absender[/b]</legend>
<TABLE border="0" width="100" height="100">
<table>
<tr>
<td>Nachname:</td>
<td align=right><input name="Nachname" size=10 maxlength=15></input></td>
</tr>
<tr>
<td>Vorname:</td>
<td align=right><INPUT name="Vorname" size="10" maxlength="15" type="text"></td>
</tr>
<tr>
<td>Klasse/Kurs:</td>
<td align=right><INPUT name="Klasse" size="3" maxlength="6" type="text"></td>
</tr>
<tr>
<td>Email:</td>
<td align=right><INPUT name="Email" size="25" maxlength="35" type="text"></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>[b]Rechner[/b]</legend>
<TABLE border="0">
<TR>
<TD colspan="1" rowspan="1">
Rechnerraum:
</TD>
<TD colspan="1" rowspan="1">
<INPUT name="Rechnerraum" size="3" maxlength="6" type="text">
</TD>
<TD colspan="1" rowspan="1">
Datum
</TD>
<TD colspan="1" rowspan="1">
<INPUT name="Datum" size="10" maxlength="15" type="text">
</TD>
</TR>
</TABLE>
<TABLE border="0">
<TR>
<TD colspan="1" rowspan="1">
Rechner-Nr.:
</TD>
<TD colspan="1" rowspan="1">
<INPUT name="Rechnerrnr" size="3" maxlength="6" type="text">
</TD>
<TD colspan="1" rowspan="1">
Uhrzeit:
</TD>
<TD colspan="1" rowspan="1">
<INPUT name="Uhrzeit" size="10" maxlength="15" type="text">
</TD>
</TR>
</TABLE>
Fehler-/Problembeschreibung:</p>
<TEXTAREA name="Beschreibung" rows="7" cols="32"></TEXTAREA>
</fieldset>
<fieldset>
<legend>[b]Formular[/b]</legend>
<input type=submit value="Absenden" onClick="return pruefe_Nachname()"></input>
<input type=reset value="Abbrechen"></input>
</fieldset>
</FORM>
</BODY>
</HTML>
Alles anzeigen