Validering af felter inden afsendelse af formmail
Jeg har lavet en simpel side til afsendelse af en formmail, men mangler at den skriver til brugeren at han ikke kan sende før alle felter er udfyldt hvis der skulle være tomme felter.<!--
.style6 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; }
.style7 {font-size: 10px}
.style10 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 10px; }
.style12 {font-family: Arial, Helvetica, sans-serif; font-size: 10; }
.style14 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.style15 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12px;
}
.style16 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 36px;
}
.style18 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 24px; }
-->
</style>
</head>
<body>
<div align="left">
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FF0000"><div align="center"><span class="style18">Retur Seddel</span></div></td>
</tr>
</table>
</div>
<hr align="left" width="75%" />
<form id="form1" name="form1" method="post" action="">
<div align="left">
<table width="75%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="17%"><span class="style6">Ordrenummer:</span></td>
<td width="34%"><span class="style6">
<label>
<input name="ordrenummer" type="text" id="ordrenummer" />
</label>
*</span></td>
<td width="16%"> </td>
<td width="31%"> </td>
</tr>
<tr>
<td><span class="style6">Navn:</span></td>
<td><span class="style6">
<label>
<input name="navn" type="text" id="navn" />
</label>
*</span></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><span class="style6">Adresse:</span></td>
<td><span class="style6">
<label>
<input name="adresse" type="text" id="adresse" />
</label>
*</span></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><span class="style6">Postnummer:</span></td>
<td><span class="style6">
<label>
<input name="postnummer" type="text" id="postnummer" />
</label>
*</span></td>
<td><span class="style6">By:</span></td>
<td><span class="style6">
<label>
<input name="by" type="text" id="by" />
</label>
*</span></td>
</tr>
<tr>
<td><span class="style6">Telefon:</span></td>
<td><span class="style6">
<label>
<input name="telefon" type="text" id="telefon" />
</label>
*</span></td>
<td><span class="style6">E-mail:</span></td>
<td><span class="style6">
<label>
<input name="email" type="text" id="email" />
</label>
*</span></td>
</tr>
<tr>
<td colspan="4"><br />
<hr /></td>
</tr>
<tr>
<td colspan="2"><span class="style6"><strong>Info om varen: (hvad kommer retur)</strong> </span></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><span class="style6">Stk.</span></td>
<td><p align="center" class="style10">Vare nummer/navn</p> </td>
<td><p align="center" class="style10">pris</p> </td>
<td> </td>
</tr>
<tr>
<td><span class="style6">
<label>
<input name="Stk1" type="text" id="Stk1" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Vare1" type="text" id="Vare1" size="50" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Pris1" type="text" id="Pris1" />
</label>
</span></td>
<td> </td>
</tr>
<tr>
<td><span class="style6">
<label>
<input name="Stk2" type="text" id="Stk2" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Vare2" type="text" id="Vare2" size="50" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Pris2" type="text" id="Pris2" />
</label>
</span></td>
<td> </td>
</tr>
<tr>
<td><span class="style6">
<label>
<input name="Stk3" type="text" id="Stk3" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Vare3" type="text" id="Vare3" size="50" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Pris3" type="text" id="Pris3" />
</label>
</span></td>
<td> </td>
</tr>
<tr>
<td><span class="style6">
<label>
<input name="Stk4" type="text" id="Stk4" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Vare4" type="text" id="Vare4" size="50" />
</label>
</span></td>
<td><span class="style6">
<label>
<input name="Pris4" type="text" id="Pris4" />
</label>
</span></td>
<td><span class="style7"></span></td>
</tr>
</table>
</div>
<hr align="left" width="75%" />
<div align="left"><br />
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4%"><span class="style12">
<label>
<input name="Penge retur" type="checkbox" id="Penge retur" value="Ja" />
</label>
</span></td>
<td width="26%"><span class="style14">Jeg vil gerne have pengene retur.</span></td>
<td width="5%"><span class="style14">Reg.nr.</span></td>
<td width="13%"><input name="Reg.nr." type="text" id="Reg.nr." size="10" /></td>
<td width="13%"><span class="style14">Kontonummer:</span></td>
<td width="39%"><input name="Kontonr." type="text" id="Kontonr." /></td>
</tr>
</table>
<br />
</div>
<hr align="left" width="75%" />
<p align="left"> </p>
<div align="left">
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="21%"><span class="style14">Beskrivelse af problemet<strong>:</strong></span></td>
<td width="79%"><label>
<textarea name="Beskrivelse af problem" cols="80" rows="10" id="Beskrivelse af problem"></textarea>
</label></td>
</tr>
</table>
</div>
<p align="left"> </p>
<hr align="left" width="75%" />
<p align="left"> </p>
<p>
<label>
<div align="center">
<div align="center">
<input name="Submit" type="submit" id="Submit" value="Send" />
</div>
</div>
</label>
<div align="left">
</p>
</div>
</form>
</body>
</html>