grazie killer ma non funziona bene, va in errore anche quando la somma è pari a 100...
A te funziona?
ti riporto il mio codice qualora avessi commesso qualche errore io...
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<script type="text/javascript">
function CheckSum(value1, value2)
{
if(eval(value1 + value2) != 100)
{
alert('errore');
return ;
}
document.form1.submit();
}
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento senza titolo</title>
</head>
<body>
<form name="form1" method="post" >
<input name="campo1" type="text" id="totale" >
<input name="campo2" type="text" id="destinazione">
<Input type=button value=submit onClick="CheckSum(form1.campo1.value, form1.campo2.value);">
</form>
</body>
</html>