Con IE 6.0 fa lo submit.
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function isNum(unValore) {
return isNaN(unValore) ? false : true;
}
function ctt(unTextField) {
if (! isNum(unTextField.value)) {
alert("Valore non numerico");
return;
}
aForm = unTextField.parentElement;
alert(aForm.tagName);
aForm.submit();
}
//-->
</script>
<form id="pippo" action="pippo.php" method="post">
<input type="text" id="t1">
<input type="button" value="clicca" onclick="ctt(document.getElementById('t1'))">
</form>
</body>
</html>
L'alert che ho aggiunto mostra FORM