-5
This if is correct? because if I withdraw this IF it makes the call from ajax and successfully sends the fields.
<input type="submit" class="btn btn-primary" onClick='validaFrm' value="Enviar mensagem" />
<script language="JavaScript">
function validaFrm(frm) {
if (((frm.atividades.value !=="") && (frm.numero.value !=="") && (frm.nome.value !== "") && (frm.email.value !== "") && (frm.municipio.value !== "") && (frm.mensagem.value !== "")))
{
EnviaEmailInstrucao("atividades","numero","nome","email","municipio","mensagem","emailInea")
}
else
{
EnviaEmailInstrucao="Erro ao enviar";
}
}
</script>
@ramaral Sorry, we are editing at the same time and overwriting each other.
– bfavaretto
Is there an error in your console?
– Henrique Barcelos
frm
is not defined!– bfavaretto
@bfavaretto No problem. What matters is that the question gets well formatted code.
– ramaral