davidmcolaco
Technical User
Hi,
I'm learning javascript now and I have form made, but now I would like to check and validate if the user has inserted the e-mail address and I searched and made a code for that, but doesn't seem to work. Can someone help me understand why it doesn't work.
The function is this:
function ValidateForm(frm_recuperacao)
{
if(IsEmpty(frm_recuperacao.txtemail))
{
alert(You didn't insert E-mail address!')
frm_recuperacao.txtemail.focus();
return false;
}
return true;
}
And then on the form part I have this code:
<form action="enviar_email_vobis.asp" method="post" name="frm_recuperacao" id="frm_recuperacao" onsubmit="javascript:return ValidateForm(frm_recuperacao)">
Thanks in advance.
I'm learning javascript now and I have form made, but now I would like to check and validate if the user has inserted the e-mail address and I searched and made a code for that, but doesn't seem to work. Can someone help me understand why it doesn't work.
The function is this:
function ValidateForm(frm_recuperacao)
{
if(IsEmpty(frm_recuperacao.txtemail))
{
alert(You didn't insert E-mail address!')
frm_recuperacao.txtemail.focus();
return false;
}
return true;
}
And then on the form part I have this code:
<form action="enviar_email_vobis.asp" method="post" name="frm_recuperacao" id="frm_recuperacao" onsubmit="javascript:return ValidateForm(frm_recuperacao)">
Thanks in advance.