validering af felter
Hej !Jeg har følgende form :
<form method="POST" action="add_report.asp">
<br>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="350" id="AutoNumber2">
<tr>
<td width="20%" align="center"><font face="Verdana" size="1">
Navn
</td>
<td width="80%" align="center"><input type="text" name="navn" size="40" style="border-style: dotted; border-width: 1; background-color: #d7dadf"></td>
</tr>
</table>
</center>
</div>
<br>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="350" id="AutoNumber2">
<tr>
<td width="20%" align="center"><font face="Verdana" size="1">
Alias
</td>
<td width="80%" align="center"><input type="text" name="alias" size="40" style="border-style: dotted; border-width: 1; background-color: #d7dadf"></td>
</tr>
</table>
</center>
</div>
<br>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="350" id="AutoNumber2">
<tr>
<td width="20%" align="center"><font face="Verdana" size="1">
By
</td>
<td width="80%" align="center"><input type="text" name="by" size="40" style="border-style: dotted; border-width: 1; background-color: #d7dadf"></td>
</tr>
</table>
</center>
</div>
<br>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="350" id="AutoNumber2">
<tr>
<td width="20%" align="center"><font face="Verdana" size="1">
</td>
<td width="80%" align="center"><input type="text" name="email" size="40" style="border-style: dotted; border-width: 1; background-color: #d7dadf"></td>
</tr>
</table>
</center>
</div>
<br>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="350" id="AutoNumber2">
<tr>
<td width="100%">
<p align="center">
<font face="Verdana" size="1">
<strong>
<input type="Submit" value="Gem tilmelding" name="Submit" class="Trykknap">
</strong>
</font>
</p>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
Der er altså 4 felter hvor brugeren kan indtaste navn, alias, by og email. Jeg vil gerne have at når man trykker submit (eller bare inden man forlader siden) får afvide hvis et af felterne er udfyld forkert. I kan næsten sige jer selv reglerne for de enkelte felter. Ihvert fald er alle felter obligatorisk, i email skal der indgå @, der må ikke være tal og tegn i navn og by og så videre i den duer. Hvordan laver man det ?