Ciao a tutti, ho un problema con una pagina php che sto facendo, che usa un form e una verifica via js per controllare che i campi siano utilizzati.
Provo a inserire qui un pezzo del form e della verifica JS.
Qualcuno mi riesce a dare una mano?

Alberto

<head>
[...]
<script language="javascript" src="../Scripts/controllischede.js" type="text/javascript"></script>
</head>
[...]
<form id="scheda" name="scheda" method="post">
<table width="100%" border="0">
<tr>
<td width="2%"></td>
<td width="50%" valign="top">Titolo del Film: *</td>
<td colspan="2"><input name="titolo" type="text" id="titolo" size="30" maxlength="50" /></td>
</tr>
<tr>
<td></td>
<td valign="top">Sottotitolo (se presente):</td>
<td colspan="2">
<input name="sottotitolo" type="text" id="sottotitolo" size="30" maxlength="50" />
</td>
</tr>
[...ci sono ancora una 15ina di campi...]
<tr>
<td colspan="4" align="center">
<input type="button" name="conferma" id="button" value="Conferma" onClick="controllo_cinema()"/>
<input type="reset" name="azzera" id="azzera" value="Azzera" />
</td>
</tr>
</table>
</form>
Codice controllischede.js.
function verifica_cinema()
{
with(document.scheda) {
if ((titolo.value == "") || (titolo.value == "undefined")) {
alert("Il campo TITOLO è obbligatorio.");
titolo.focus();
return false;
} else if ((sottotitolo.value == "") || (sottotitolo.value == "undefined")) {
alert("Il campo SOTTOTITOLO è obbligatorio.");
sottotitolo.focus();
return false;
} else {
action="editscheda.php"
submit();
}
}
};