Prova cosi':
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script language="Javascript" type="text/javascript">
<!--
function ValidateForm()
{
var nome = document.form.nome.value;
if(nome == "")
{
alert('Devi inserire il nome')
document.form.nome.focus();
return false;
}
else {
document.form.action = "elaboraform.php";
document.form.submit();
}
return true;
}
function isEmpty(inputStr) {
if ( null == inputStr || "" == inputStr )
return true;
return false;
}
//-->
</script>
<body>
<form name="form" method="post" onsubmit="ValidateForm();">
<fieldset>
<legend>Dati Anagrafici</legend>
<p><label for="nome">Nome </label><input name="nome" type="text" id="nome" class="txt" /></p>
<p><label for="cognome">Cognome </label><input name="cognome" type="text" id="cognome" class="txt" /></p>
<p><label for="data">Data Nascita </label><input name="data" type="text" id="data" class="txt" /></p>
<p><label for="luogo">Luogo Nascita </label><input name="luogo" type="text" id="luogo" class="txt" /></p>
</fieldset>
<input type="submit" name="Submit" value="Invia" onclick="ValidateForm(); return false;" class="right" />
</form>
</body>
</html>
Buona giornata,
Leonardo