Problema javascript cicla sempre per vero
Codice HTML:
<html>
<title>PROBLEMA DELLE SCORTE</title>
<head>
<script type="text/javascript">
function controlla()
{
if(document.modulo.nor1.value == '' || document.modulo.co1.value == '' || document.modulo.no1.value == '' || document.modulo.cm.value == '')
{
alert("Compilare tutti i campi!");
return false;
}
if(document.modulo.nor1.value != '[0-9]' || document.modulo.co1.value !='[0-9]' || document.modulo.no1.value != '[0-9]' || document.modulo.cm.value != '[0-9]')
{
alert("Inserire solo numeri!");
return false;
}
return true;
}
</script>
</head>
<body background="s1.gif">
<H1>PROBLEMA DELLE SCORTE</H1>
<form name="modulo" method="post" Action="out.php" onsubmit="return controlla()">
Inserisci quantità (in q):
<input type="text" name="nor1" size="40"> <br/>
Inserire costo di ordinazione:
<input type="text" name="co1" size="40"> <br/>
Inserire costo di magazzino:
<input type="text" name="no1" size="40"> <br/>
Inserire capacità massima di magazzino (in q):
<input type="text" name="cm" size="40"> <br/>
<input type="submit" value="Calcola">
<input type="reset" value="Cancella Tutto"name="rifare"><BR><BR><BR><BR>
<input type="button" value="Torna al menù programmi" OnClick="document.location.href='programmi.htm'"><BR><BR>
<a href="homepage.htm"><img src="casa.gif"></a>
</form>
</body>
</html>
questa funzione dovrebbe controllare i campi di questa pagina http://giacomofabbian.altervista.org/sco.htm
il problema è che la seconda parte di codice non funziona anche quando inserisco numeri mi da errore perchè???