<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function isEmpty(val) {
return !/\S/.test(val);
}
function checkPi(miaform){
if(isEmpty(miaform.PIVA.value)){
alert("Errore: compilare il campo PARTITA IVA");
miaform.PIVA.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<form action="test.php" onSubmit="return checkPi(this)" method="post" >
<label>Pi: </label>
<input name="PIVA" title="PIVA" type="text" value="" />
<input name="tag_save" type="submit" value="Save" id="tag-save" />
</form>
</div>
</div>
</body>
</html>![]()