Ho provato anke così ma sempre picche stesso errore

function sendemail(){
var test = document.forms['ciccio'].elements['pippo'].value;
if ((test=='') || (test=='undefined')){
alert('il campo email è obbligatorio');
document.forms['ciccio'].elements['pippo'].focus();
return false;
}
else{
document.ciccio.action = 'action=areautente.asp?cmd=mail';
document.ciccio.submit();

questa è la form
<form name=ciccio ><tr><td width='25%'>E-mail</td><td width='25%'>
<INPUT name='pippo' tabIndex=4></td><td width='50%' >
<input type='button' value='Richiesta Password' tabIndex=5 onclick=sendemail() ></td></tr>
</form>