Jeg har knoklet og knoklet med den her, men jeg kan simpelthen
ikke se hvad der er galt...jeg får fejlbesked på htmlstyle(-1); ,
men jeg har overtaget scriptet fra en anden og jeg kan ikke se
hvad delen der er galt her.
<!kode>
<script language="javascript">
<!--
function DynSubmit(input_action) {
var error = "";
htmlstyle(-1);
if (document.form.custname.value.length < 1) {
error += "You must enter a customer name.\n";
}
if (document.form.custmail.value.length < 1) {
error += "You must enter a customer e-mail.\n";
}
if (document.form.custadr.value.length < 1) {
error += "You must enter a address.\n";
}
if (document.form.custtlf.value.length < 1) {
error += "You must enter a phonenumber.\n";
}
if (document.form.custserie.value.length < 1) {
error += "You must enter a serial-number.\n";
}
if (document.form.custspare.value.length < 1) {
error += "You must enter a sparepart-number.\n";
}
if (document.form.custprob.value.length < 1) {
error += "You must enter a Problem description.\n";
}
if (error.length > 0) {
alert(error);
} else {
document.form.submit();
}
}
// -->
</script>
<table class="maintextbox" cellpadding="0" cellspacing="0">
<tr>
<td align="left" class="titleheader" height="14">
<table class="tableheader" cellpadding="0" cellspacing="0"
border="0">
<tr>
<td>
On-site form
</td>
<td background="images/triangle.gif" width="20"></td>
</tr>
</table>
</td>
<td align="right" class="titleheaderright" height="14"
valign="top"></td>
</tr>
<tr>
<td class="listtable" align="left" valign="top" colspan="2">
<table border="0" class="texttable" width="100%"
cellpadding="0" cellspacing="0">
<tr>
<form name="form" action="?page=onsite" method="post">
<input type="hidden" name="formcheck" value="y">
<td colspan="2"><b>Autortized Service Provider:</b></td>
</tr>
<tr>
<td width="140">ASP:</td>
<td><select size="1" name="sendto" class="edittextinput">
<option value="steven.pedersen@sveg.se.sykes.com"
selected>steven</option>
<option
value="kasper.nielsen@sveg.se.sykes.com">Servicegruppen</option>
<option value="dan.hansen@sveg.se.sykes.com">Infocare</option>
</select></td>
</tr>
<tr>
<td colspan="2"><b>Customer information:</b></td>
</tr>
<tr>
<td>Name:</td>
<td><input type="text" name="custname" value=""
class="edittextinput"></td>
</tr>
<tr>
<td>E-mail:</td>
<td><input type="text" name="custmail" value=""
class="edittextinput"></td>
</tr>
<tr>
<td>Address:</td>
<td><input type="text" name="custadr" value=""
class="edittextinput"></td>
</tr>
<tr>
<td>Telephone:</td>
<td><input type="text" name="custtlf" value=""
class="edittextinput"></td>
</tr>
<tr>
<td>Seriel-number:</td>
<td><input type="text" name="custserie" value=""
class="edittextinput"></td>
</tr>
<tr>
<td>Carepaq-number:</td>
<td><input type="text" name="custpaq" value=""
class="edittextinput"></td>
</tr>
<tr>
<td>Sparepart-number:</td>
<td><input type="text" name="custspare" value=""
class="edittextinput"></td>
</tr>
<tr>
<td valign="top">Problem description:</td>
<td><textarea name="custprob" value="" rows="6" cols="20"
class="textarea"></textarea></td>
</tr>
<tr>
<td valign="top">Notes:</td>
<td><textarea name="custnote" value="" rows="6" cols="20"
class="textarea"></textarea></td>
</tr>
<tr>
<td colspan="2">
Customer wishes to be contacted by ASP before service : <input
type="checkbox" name="kundeprekontakt" value="Customer want
contact from ASP before service"><br>
</td>
</tr>
<tr>
<td align="right" colspan="2"><input
onClick="DynSubmit('post');" type="submit" class="submit"
value="Submit form" onMouseOver="this.style.background='#CCCCCC'"
onMouseOut="this.style.background='#FFFFFF'">
</td></form>
</tr>
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials