0
I have a password field and confirm password, I want to check if both are equal.
NOTE: There is an OFF autocomplete for the email field
$(document).ready(function () {
$('#txtEmail').attr('autocomplete','off');
if( $('#txtSenha').val() != $('#txtSenhaConfirme').val() )
{
alert('Senhas diferentes');
return false;
}
});
Not from JS error, it just doesn’t work. NOTE: Even corrected the typing error, not yet validated.
http://meta.pt.stackoverflow.com/a/1911/101
– Maniero
Dude, after the different one is missing a "$(" ?
– Marconi
Unrelated, but don’t forget to also do a validation server side (Javascript may be disabled on the client, or even manipulated by an experienced user).
– Anthony Accioly