I wrote following javascript code:
$("#email").change(function () {
email = $("#email").val()
if (validateEmail(email)) {
$('#button').enable();
} else {
$('#button').disable();
}
})
Also I have following form:
<form name='register_form' action="<c:url value='/register_new_user' />" method='POST'
onsubmit="return validateRegisterForm(this);">
<div class="input-line">
<input type="text" class="text" name='email' id='email' />
<div class="input-line bottom">
<input type="submit" class="button" value="зарегистрироваться" id='button' />
</div>
</form>
function passed to change method doesn't execute when I change value of input.
Why? how to achieve it?