Grazie Michele,
ho trovato l'errore "prima" di seguire il suggerimento: in pratica dovevo mettere "onsubmit" anzichè "onclick"

Ora è ok, grazie.