My button enables only when in enter the text in the field through typing and when i enter the the text with browser history mean that when i click on the field it shows the previous record and i enter it with mouse then button is not enabled.
This is my code:
<script type="text/javascript">
$(function() {
$(":text").keyup( check_submit).each(function() {
check_submit();
});
});
function check_submit() {
$('input[type="submit"]').attr('disabled','disabled');
if ($(this).val().length == '') {
$(":submit").attr("disabled", true);
} else {
$(":submit").removeAttr("disabled");
}
}
</script>
Any help? Thanks