Tengo esta funcion que quiero empezar a hacer para validar un formulario:
Código:
e inmediatamente despues, tengo este HTML:<script language="javascript" type="text⁄javascript"> function Validar() { if (document.FormularioAnuncio.TituloAnuncio.value=='') { alert("Mensaje error"); return (false); } } </script>
Código HTML:
<form name="FormularioAnuncio" action="index.php" method="post" onSubmit="return Validar();">
Ayuda

Edit; Ooobviamente el formulario esta bien cerrado, tengo un input type="submit", y varios input type="text".
Entre ellos uno que se llama TituloAnuncio.