0
The code below is working, but no else
is not redirecting to another page with the window.location.assign()
.
function verifica() {
if (document.forms[0].email.value.length == 0) {
alert('Por favor, informe o seu EMAIL.');
document.frmEnvia.email.focus();
return false;
}
return true;
}
function checarEmail(){
if( document.forms[0].email.value==""
|| document.forms[0].email.value.indexOf('@')==-1
|| document.forms[0].email.value.indexOf('.')==-1 )
{
alert( "Por favor, informe um E-MAIL válido!" );
return false;
} else {
window.location.assign('http://www.example.com')
}
}
tried to use
window.location.replace('<URL>')
?– Cmte Cardeal
This answers your question? How to redirect the user to another Javascript/jQuery page?
– Augusto Vasques